shithub: choc

Download patch

ref: 5bf73c4864fedb6b97b27bf302435a1168ba8f4c
parent: c0a6b6b5d0b7b5b051bf30b51a7482358dacea57
parent: 34f29737110c5c6063d36a66a05a10ceb68b36c4
author: Turo Lamminen <turol@users.noreply.github.com>
date: Wed Jun 3 06:32:28 EDT 2020

Merge pull request #1288 from turol/gcc10-warning

Fix GCC 10 warning

--- a/src/heretic/mn_menu.c
+++ b/src/heretic/mn_menu.c
@@ -1525,9 +1525,10 @@
         {
             if (slotptr)
             {
-                *textBuffer-- = 0;
-                *textBuffer = ASCII_CURSOR;
+                *textBuffer = 0;
                 slotptr--;
+                textBuffer = &SlotText[currentSlot][slotptr];
+                *textBuffer = ASCII_CURSOR;
             }
             return (true);
         }
--- a/src/hexen/mn_menu.c
+++ b/src/hexen/mn_menu.c
@@ -1658,9 +1658,10 @@
         {
             if (slotptr)
             {
-                *textBuffer-- = 0;
-                *textBuffer = ASCII_CURSOR;
+                *textBuffer = 0;
                 slotptr--;
+                textBuffer = &SlotText[currentSlot][slotptr];
+                *textBuffer = ASCII_CURSOR;
             }
             return (true);
         }