[Freeciv-Dev] (PR#14831) Bug in scanin()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14831 >
Because of this bug I couldn't load any game, because scanin() was
overwriting the x variable in savegame code.
--
mateusz
Index: utility/shared.c
===================================================================
--- utility/shared.c (wersja 11343)
+++ utility/shared.c (kopia robocza)
@@ -1603,7 +1603,8 @@
}
if (dest) {
- strncpy(dest, *buf, size);
+ strncpy(dest, *buf, size-1);
+ dest[size-1] = '\0';
remove_leading_trailing_spaces(dest);
ptr = strpbrk(dest, delimiters);
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#14831) Bug in scanin(),
Mateusz Stefek <=
|
|