diff options
| author | Tristan Riehs <tristan.riehs@inria.fr> | 2025-11-16 10:34:14 +0100 |
|---|---|---|
| committer | Tristan Riehs <tristan.riehs@inria.fr> | 2025-11-16 10:34:14 +0100 |
| commit | 85b3cf1a9e26c98366c6b0b11316447f9afddf3e (patch) | |
| tree | 4203838d59d3466f163cf17f7c55ab88d7c17f1f /src/main.c | |
| parent | 112e72994f4423392769bc7a5fecee6ce9648010 (diff) | |
Fix table_next_id
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -76,7 +76,7 @@ static void assert_no_single_quote(const char *str) assert(strchr(str, ';') == NULL); } -/* Write an id to *_ID, used by table_next_id. Write 0 if no id is found. */ +/* Write an id to *_ID, used by table_next_id. Write -1 if no id is found. */ static int table_next_id_callback(void *_id, int, char **cols, char **) { /* output has only one column, so our id is in COLS[0] */ @@ -84,7 +84,7 @@ static int table_next_id_callback(void *_id, int, char **cols, char **) if (cols[0]) *id = atoi(cols[0]); else - *id = 0; + *id = -1; return 0; } |
