From 2ea77a015a9bc307237966b5cebc90121082881a Mon Sep 17 00:00:00 2001 From: Olaf Wintermann Date: Fri, 16 May 2025 08:06:53 +0200 Subject: [PATCH] fix qthr_new_note --- application/store.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/store.c b/application/store.c index 48c18be..1bef075 100644 --- a/application/store.c +++ b/application/store.c @@ -538,9 +538,9 @@ static int qthr_new_note(SaveNoteJob *job) { dbuQuerySetParamInt64(q2, 1, new_id); dbuQuerySetParamInt64(q2, 2, 0); if(!dbuQueryExec(q2)) { - DBUResult *insert2Result = dbuQueryGetResult(q); + DBUResult *insert2Result = dbuQueryGetResult(q2); int64_t note_id; - if(dbuResultAsInt64(insert2Result, ¬e_id)) { + if(!dbuResultAsInt64(insert2Result, ¬e_id)) { job->note->note_id = note_id; } else { job->error = 4; -- 2.43.5