Eradicate more 32s

This commit is contained in:
Erica Fischer
2024-03-14 14:54:54 -07:00
parent a12bea7129
commit 4632b15b47
8 changed files with 82 additions and 78 deletions
+3 -1
View File
@@ -4,6 +4,8 @@
#include <sqlite3.h>
#include "errors.hpp"
#define MAX_MAXZOOM 32
void enumerate(char *fname) {
sqlite3 *db;
@@ -31,7 +33,7 @@ void enumerate(char *fname) {
long long x = sqlite3_column_int(stmt, 1);
long long y = sqlite3_column_int(stmt, 2);
if (zoom < 0 || zoom > 31) {
if (zoom < 0 || zoom > MAX_MAXZOOM) {
fprintf(stderr, "Corrupt mbtiles file: impossible zoom level %lld\n", zoom);
exit(EXIT_IMPOSSIBLE);
}