чување 37f924f286c49cdde90b6152a005d56ff4d73d20
родитељ 8e8ab2c5d33a2a70f4a0fc6703cb11a83fa0e550
Аутор: Страхиња Радић <sr@strahinja.org>
Датум: Sun, 9 Nov 2025 11:21:11 +0100
poe.c: Bugfix: msgstr_index was not reinitialized to 0, leading to SEGV
Diffstat:
измењених датотека: 1, додавања: 4(+), брисања: 0(-)
diff --git a/poe.c b/poe.c
@@ -1941,6 +1941,10 @@ save_msgstr(struct DrawState* state)
int
show_edit(struct DrawState* state)
{
+ if (state->msgstr_index + 1
+ > state->entries[state->msgid_number - 1].msgstr_count)
+ state->msgstr_index = 0;
+
if (!load_msgstr(state) || !load_info(state))
{
STRLCPY(errors[ERR_CANT_ALLOC], state->error, MAXBUFLINE);