ref: 0ad3b513a087018178d47504104f2bc9a6f257a6
parent: 316de2e60c60455710f2937d379236372e911a36
author: cancel <cancel@cancel.fm>
date: Sun Nov 25 23:57:33 EST 2018
Add ORCA_ROW_MAX and ORCA_COL_MAX
--- a/base.h
+++ b/base.h
@@ -8,6 +8,9 @@
#include <string.h>
#include <unistd.h>
+#define ORCA_ROW_MAX UINT16_MAX
+#define ORCA_COL_MAX UINT16_MAX
+
typedef char Term;
typedef uint16_t U16;
typedef int16_t I16;
--- a/field.c
+++ b/field.c
@@ -178,7 +178,7 @@
char* s = fgets(buf, Bufsize, file);
if (s == NULL)
break;
- if (rows == UINT16_MAX) {
+ if (rows == ORCA_ROW_MAX) {
fclose(file);
return Field_load_error_too_many_rows;
}
@@ -196,7 +196,7 @@
}
if (len == 0)
continue;
- if (len > UINT16_MAX) {
+ if (len >= ORCA_ROW_MAX) {
fclose(file);
return Field_load_error_too_many_columns;
}