summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index b6eb880b9..126fcdebc 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -140,7 +140,7 @@ static LangString *HashFind(const char *s)
#ifdef _MSC_VER
# define LINE_NUM_FMT(s) "%s (%d): warning: %s (" s ")\n"
#else
-# define LINE_NUM_FMT(s) "%s: :%d: " s ": %s\n"
+# define LINE_NUM_FMT(s) "%s:%d: " s ": %s\n"
#endif
static void CDECL strgen_warning(const char *s, ...) WARN_FORMAT(1, 2);
@@ -397,6 +397,11 @@ static void EmitGender(char *buf, int value)
* If no relative number exists, default to +0 */
if (!ParseRelNum(&buf, &argidx, &offset)) {}
+ const CmdStruct *cmd = _cur_pcs.cmd[argidx];
+ if ((cmd->flags & C_GENDER) == 0) {
+ error("Command '%s' can't have a gender", cmd->cmd);
+ }
+
for (nw = 0; nw < MAX_NUM_GENDER; nw++) {
words[nw] = ParseWord(&buf);
if (words[nw] == NULL) break;