diff options
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; |