Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions db.c
Original file line numberDiff line numberDiff line change
Expand Up@@ -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) {
Expand DownExpand Up@@ -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");
Expand Down