dbJLink: fix assignment-instead-of-compare in dbJLinkMapAll

The guard used recname[0] = '\0' (assignment) instead of == , which wrote
a NUL into the caller's string, truncating it to "", and evaluated to 0
so recname was left non-NULL pointing at "".  Every record then failed
the name comparison and nothing was mapped.  Use ==, matching dbjlr.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jacqueline GarrahanandClaude Opus 4.8 authored and Dirk Zimoch committed 2026-10-14 11:18:33 +02:00
1 parent 2ec624aad6
commit 91aba2cb0a
1 file changed
+1 -1
+1 -1
View File
@@ -551,7 +551,7 @@ long dbJLinkMapAll(char *recname, jlink_map_fn rtn, void *ctx)
DBENTRY * const pdbentry = &dbentry;
long status;
if (recname && (recname[0] = '\0' || !strcmp(recname, "*")))
if (recname && (recname[0] == '\0' || !strcmp(recname, "*")))
recname = NULL;
dbInitEntry(pdbbase, pdbentry);