File diff r25482:5d7a2a26621c → r25483:15f7a4f91c03
src/strgen/strgen_base.cpp
Show inline comments
 
@@ -448,25 +448,25 @@ void EmitGender(Buffer *buffer, char *bu
 
		/* This is a {G=DER} command */
 
		nw = _lang.GetGenderIndex(buf);
 
		if (nw >= MAX_NUM_GENDERS) strgen_fatal("G argument '%s' invalid", buf);
 

	
 
		/* now nw contains the gender index */
 
		buffer->AppendUtf8(SCC_GENDER_INDEX);
 
		buffer->AppendByte(nw);
 
	} else {
 
		const char *words[MAX_NUM_GENDERS];
 

	
 
		/* This is a {G 0 foo bar two} command.
 
		 * If no relative number exists, default to +0 */
 
		if (!ParseRelNum(&buf, &argidx, &offset)) {}
 
		ParseRelNum(&buf, &argidx, &offset);
 

	
 
		const CmdStruct *cmd = _cur_pcs.cmd[argidx];
 
		if (cmd == nullptr || (cmd->flags & C_GENDER) == 0) {
 
			strgen_fatal("Command '%s' can't have a gender", cmd == nullptr ? "<empty>" : cmd->cmd);
 
		}
 

	
 
		for (nw = 0; nw < MAX_NUM_GENDERS; nw++) {
 
			words[nw] = ParseWord(&buf);
 
			if (words[nw] == nullptr) break;
 
		}
 
		if (nw != _lang.num_genders) strgen_fatal("Bad # of arguments for gender command");