diff --git a/db.c b/db.c index ce3a590..3626d60 100644 --- a/db.c +++ b/db.c @@ -630,7 +630,7 @@ PrepareResult prepare_insert(InputBuffer* input_buffer, Statement* statement) { } int id = atoi(id_string); - if (id < 0) { + if (id <= 0) { return PREPARE_NEGATIVE_ID; } if (strlen(username) > COLUMN_USERNAME_SIZE) { @@ -1024,7 +1024,7 @@ int main(int argc, char* argv[]) { case (PREPARE_SUCCESS): break; case (PREPARE_NEGATIVE_ID): - printf("ID must be positive.\n"); + printf("ID must be a positive integer.\n"); continue; case (PREPARE_STRING_TOO_LONG): printf("String is too long.\n");