correct bug with the string trim algorithm
This commit is contained in:
@@ -369,8 +369,10 @@ static int cyberiada_string_trim(char* orig)
|
||||
while(s > orig) {
|
||||
if (isspace(*s)) {
|
||||
*s = 0;
|
||||
}
|
||||
s--;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -3227,7 +3229,11 @@ static int cyberiada_write_action_text(xmlTextWriterPtr writer, CyberiadaAction*
|
||||
}
|
||||
} else {
|
||||
if (*(action->guard)) {
|
||||
if (*(action->trigger)) {
|
||||
snprintf(buffer, buffer_len, "%s [%s]/", action->trigger, action->guard);
|
||||
} else {
|
||||
snprintf(buffer, buffer_len, "[%s]/", action->guard);
|
||||
}
|
||||
} else {
|
||||
snprintf(buffer, buffer_len, "%s/", action->trigger);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user