mirror of https://github.com/encounter/SDL.git
os2joystick: fix -Wsequence-point issues.
This commit is contained in:
parent
f14c7bb443
commit
17da60068d
|
@ -708,10 +708,18 @@ static int joyGetEnv(struct _joycfg * joydata)
|
|||
while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */
|
||||
|
||||
/* 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 */
|
||||
else if (*joyenv == '\"') joyenv += joyGetData(++joyenv,joydata->name,'\"',sizeof(joydata->name));
|
||||
else joyenv += joyGetData(joyenv,joydata->name,' ',sizeof(joydata->name));
|
||||
else if (*joyenv == '\"') {
|
||||
joyenv++;
|
||||
joyenv += joyGetData(joyenv,joydata->name,'\"',sizeof(joydata->name));
|
||||
}
|
||||
else {
|
||||
joyenv += joyGetData(joyenv,joydata->name, ' ',sizeof(joydata->name));
|
||||
}
|
||||
|
||||
/* Now get the number of axes */
|
||||
while (*joyenv == ' ' && *joyenv != 0) joyenv++; /* jump spaces... */
|
||||
|
|
Loading…
Reference in New Issue