os2joystick: fix -Wsequence-point issues.

This commit is contained in:
Ozkan Sezer 2022-01-09 20:33:32 +03:00
parent f14c7bb443
commit 17da60068d
1 changed files with 11 additions and 3 deletions

View File

@ -708,10 +708,18 @@ static int joyGetEnv(struct _joycfg * joydata)
while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */
/* If the string name starts with '... get if fully */ /* If the string name starts with '... get if fully */
if (*joyenv == '\'') joyenv += joyGetData(++joyenv,joydata->name,'\'',sizeof(joydata->name)); if (*joyenv == '\'') {
joyenv++;
joyenv += joyGetData(joyenv,joydata->name,'\'',sizeof(joydata->name));
}
/* If not, get it until the next space */ /* If not, get it until the next space */
else if (*joyenv == '\"') joyenv += joyGetData(++joyenv,joydata->name,'\"',sizeof(joydata->name)); else if (*joyenv == '\"') {
else joyenv += joyGetData(joyenv,joydata->name,' ',sizeof(joydata->name)); joyenv++;
joyenv += joyGetData(joyenv,joydata->name,'\"',sizeof(joydata->name));
}
else {
joyenv += joyGetData(joyenv,joydata->name, ' ',sizeof(joydata->name));
}
/* Now get the number of axes */ /* Now get the number of axes */
while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */ while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */