]> granicus.if.org Git - nethack/commitdiff
egraving fix
authorPatR <rankin@nethack.org>
Sun, 5 Mar 2023 22:49:45 +0000 (14:49 -0800)
committerPatR <rankin@nethack.org>
Sun, 5 Mar 2023 22:49:45 +0000 (14:49 -0800)
Fix a "format is not literal" warning.

src/pager.c

index a2d314ecefcb54fadf75c18473e8cb5d31888af1..af598a57b74c9dfd1570fa82069fb0bf6ac0e216 100644 (file)
@@ -1430,7 +1430,8 @@ add_quoted_engraving(coordxy x, coordxy y, char *buf)
 
     if (ep) {
         if (ep->eread)
-            Snprintf(temp_buf, sizeof temp_buf, " with remembered text: \"%s\"",
+            Snprintf(temp_buf, sizeof temp_buf,
+                     " with remembered text: \"%s\"",
                      ep->engr_txt[remembered_text]);
         else
             Snprintf(temp_buf, sizeof temp_buf, " that you've never read");
@@ -1644,7 +1645,7 @@ do_look(int mode, coord *click_cc)
                     engbuf[0] = '\0';
                     if (add_quoted_engraving(cc.x, cc.y, engbuf)) {
                         Snprintf(eos(out_str), BUFSZ - strlen(out_str) - 1,
-                                 engbuf);
+                                 "%s", engbuf);
                     }
             }
             /* use putmixed() because there may be an encoded glyph present */