diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-11 23:12:12 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-11 23:12:12 +0300 |
commit | a756913a7134c207a7d29a1175a428b02f61b777 (patch) | |
tree | f462a6b9f5a324467973800c6315e3cd2b37e20f /src/main.c | |
parent | 89a48fc3e7252e1c7941f86559ca00b38d525244 (diff) |
minor bug fixes
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -25,7 +25,7 @@ size_t SCALE = 9; int get_least_entropy_index() { // array of indexes with the least entropy - int least_entpy[TILEMAP_CAP]; + size_t least_entpy[TILEMAP_CAP]; size_t least_entpy_sz = 0; for(size_t i = 0; i < SHEIGHT; i++) @@ -43,6 +43,7 @@ int get_least_entropy_index() size_t l1s = count_entropy(least_entpy[least_entpy_sz-1]); if(b1s == l1s) { + if(least_entpy_sz >= TILEMAP_CAP) exit(69); least_entpy[least_entpy_sz++] = index; } else if(b1s < l1s) { least_entpy[0] = index; |