From 47838d5e482cb4aac40190fa0414f08b8cf94d40 Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Sat, 11 May 2024 10:53:21 -0400 Subject: [PATCH] More name info issues. --- src/ssb.js.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ssb.js.c b/src/ssb.js.c index c4c10432..d7808c4f 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -431,15 +431,15 @@ static void _tf_ssb_getIdentityInfo_work(tf_ssb_t* ssb, void* user_data) int r = SQLITE_OK; while ((r = sqlite3_step(statement)) == SQLITE_ROW) { + const char* identity = (const char*)sqlite3_column_text(statement, 0); + const char* name = (const char*)sqlite3_column_text(statement, 1); for (int i = 0; i < request->count; i++) { - const char* identity = (const char*)sqlite3_column_text(statement, 0); - const char* name = (const char*)sqlite3_column_text(statement, 1); - if (strcmp(request->identities[i], identity) == 0 && !request->names[i]) + if (!request->names[i] && strcmp(request->identities[i], identity) == 0) { request->names[i] = tf_strdup(name); + break; } - break; } } }