1
0
mirror of https://github.com/janet-lang/janet synced 2026-02-06 02:00:22 +00:00

Fix test case.

This commit is contained in:
Calvin Rose
2026-01-23 08:30:15 -06:00
parent 0f285855f0
commit ee8d816738

View File

@@ -1937,7 +1937,10 @@ JANET_CORE_FN(os_strftime,
const char *p = fmt;
while (*p) {
if (*p++ == '%') {
if (!*p || !strchr(valid, *p)) {
if (!*p) {
janet_panic("invalid conversion specifier");
}
if (!strchr(valid, *p)) {
janet_panicf("invalid conversion specifier '%%%c'", *p);
}
p++;