diff --git a/src/menu.c b/src/menu.c
index ddbf0b4deb8a35a4e8735d9fec8d060bcdb457cd..4571b1d1fb72442880f76469d75a9faece719c54 100644 (file)
--- a/src/menu.c
+++ b/src/menu.c
-/*
- Copyright (C) Prikol Software 1996-1997
- Copyright (C) Aleksey Volynskov 1996-1997
- Copyright (C) <ARembo@gmail.com> 2011
-
- This file is part of the Doom2D:Rembo project.
-
- Doom2D:Rembo is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License version 2 as
- published by the Free Software Foundation.
-
- Doom2D:Rembo is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/> or
- write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
+/* Copyright (C) 2020 SovietPony
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, version 3 of the License ONLY.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include "glob.h"
#include "files.h"
Z_sound(s,128);
}
-static int strnlen (const char *s, int len) {
+static int x_strnlen (const char *s, int len) {
int i = 0;
while (i < len && s[i] != 0) {
i++;
} else if (type == GM_TEXTFIELD) {
//if (input) {
// icur += lastkey == KEY_LEFT ? -1 : +1;
- // icur = min(max(icur, 0), strnlen(ibuf, imax));
+ // icur = min(max(icur, 0), x_strnlen(ibuf, imax));
//}
}
break;
if (GM_send(m, cur, &msg)) {
imax = min(msg.string.maxlen, GM_MAX_INPUT);
strncpy(ibuf, msg.string.s, imax);
- icur = strnlen(ibuf, imax);
+ icur = x_strnlen(ibuf, imax);
} else {
memset(ibuf, 0, GM_MAX_INPUT);
imax = GM_MAX_INPUT;
Z_sound(msnd2, 128);
} else {
msg.type = GM_SELECT;
- if (cur < 0) abort();
if (GM_send(m, cur, &msg)) {
Z_sound(msnd2, 128);
}