Skip to content

Commit

Permalink
Tweak format of if CCMD
Browse files Browse the repository at this point in the history
  • Loading branch information
bradharding committed Oct 24, 2023
1 parent 8a165e7 commit 347f76d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/c_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
#define EXPLODECMDFORMAT BOLD("barrels") "|" BOLD("missiles")
#define GIVECMDFORMAT BOLD("ammo") "|" BOLD("armor") "|" BOLD("health") "|" BOLD("keys") "|" BOLD("weapons") "|" \
BOLD("powerups") "|" BOLD("all") "|" BOLDITALICS("item")
#define IFCMDFORMAT BOLDITALICS("CVAR") " " BOLDITALICS("value") " " BOLD("then") " [" BOLD("\"") "]" \
#define IFCMDFORMAT BOLDITALICS("CVAR") " " BOLD("is") " " BOLDITALICS("value") " " BOLD("then") " [" BOLD("\"") "]" \
BOLDITALICS("command") "[" BOLD(";") " " BOLDITALICS("command") " ..." BOLD("\"") "]"
#define KILLCMDFORMAT BOLD("player") "|" BOLD("all") "|[" BOLD("friendly") " ]" BOLDITALICS("monster")
#define LOADCMDFORMAT BOLDITALICS("filename") "[" BOLD(".save") "]"
Expand Down Expand Up @@ -3116,7 +3116,8 @@ static void if_cmd_func2(char *cmd, char *parms)
char parm2[64] = "";
char parm3[128] = "";

if (sscanf(parms, "%63s %63s then %127[^\n]", parm1, parm2, parm3) != 3)
if (sscanf(parms, "%63s is %63s then %127[^\n]", parm1, parm2, parm3) != 3
&& sscanf(parms, "%63s %63s then %127[^\n]", parm1, parm2, parm3) != 3)
{
const int i = C_GetIndex(cmd);

Expand Down

0 comments on commit 347f76d

Please sign in to comment.