1
0
mirror of https://gitlab.cvh-server.de/skrause/flashcards.git synced 2025-12-12 09:01:37 +01:00

test changes

This commit is contained in:
2025-02-06 14:03:25 +01:00
parent f8df9efafd
commit 77b6240463
8 changed files with 17 additions and 15 deletions

View File

@@ -111,10 +111,10 @@ GArray *database_load_categories()
while (sqlite3_step(stmt) == SQLITE_ROW)
{
int id = sqlite3_column_int(stmt, 0);
const unsigned char *temp_name = sqlite3_column_text(stmt, 1);
const char *temp_name = (const char *)sqlite3_column_text(stmt, 1);
char *name = g_new0(char, strlen(temp_name));
strcpy(name, temp_name);
char *name = g_new0(char, strlen(temp_name) + 1);
strncpy(name, temp_name, strlen(temp_name) + 1);
category c = {id, name};
g_array_append_val(categories, c);
}