This commit is contained in:
Nikita Ivanov 2022-06-08 11:30:29 +05:00
parent 1651ae8df9
commit d6d2ae46d9
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133

View File

@ -42,7 +42,7 @@ static void add_preview(char *name, char *script, char *type, char *subtype,
Preview p = (Preview){ Preview p = (Preview){
.name = name, .name = name,
.script = script, .script = script,
.script_len = strlen(script), .script_len = strlen(script) + 1,
.type = type, .type = type,
.subtype = subtype, .subtype = subtype,
.ext = ext, .ext = ext,
@ -168,11 +168,9 @@ static int command(void)
static int end(void) static int end(void)
{ {
int ret;
while (1) { while (1) {
ret = accept(TOK_NEW_LN); if (accept(TOK_NEW_LN) != STAT_OK)
CHECK_OK(ret); break;
} }
return STAT_OK; return STAT_OK;