Print NULL strings as "nil" in wl_closure_print
Calling printf("%s", NULL) is undefined behaviour.
Signed-off-by: Simon Ser <contact@emersion.fr>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.com>
Simon Ser authored 5 years ago
Pekka Paalanen committed 5 years ago
1277 | 1277 | wl_fixed_to_double(closure->args[i].f)); |
1278 | 1278 | break; |
1279 | 1279 | case 's': |
1280 | fprintf(stderr, "\"%s\"", closure->args[i].s); | |
1280 | if (closure->args[i].s) | |
1281 | fprintf(stderr, "\"%s\"", closure->args[i].s); | |
1282 | else | |
1283 | fprintf(stderr, "nil"); | |
1281 | 1284 | break; |
1282 | 1285 | case 'o': |
1283 | 1286 | if (closure->args[i].o) |