mirror of
https://github.com/bellard/quickjs.git
synced 2024-11-24 22:58:13 +08:00
fixed uninitialized harnessbuf
This commit is contained in:
parent
c9509664ab
commit
e80917bad4
@ -1517,7 +1517,7 @@ void update_stats(JSRuntime *rt, const char *filename) {
|
|||||||
#undef update
|
#undef update
|
||||||
}
|
}
|
||||||
|
|
||||||
int run_test_buf(const char *filename, char *harness, namelist_t *ip,
|
int run_test_buf(const char *filename, const char *harness, namelist_t *ip,
|
||||||
char *buf, size_t buf_len, const char* error_type,
|
char *buf, size_t buf_len, const char* error_type,
|
||||||
int eval_flags, BOOL is_negative, BOOL is_async,
|
int eval_flags, BOOL is_negative, BOOL is_async,
|
||||||
BOOL can_block)
|
BOOL can_block)
|
||||||
@ -1601,6 +1601,8 @@ int run_test(const char *filename, int index)
|
|||||||
if (p) {
|
if (p) {
|
||||||
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
|
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
|
||||||
(int)(p - filename), filename, "harness");
|
(int)(p - filename), filename, "harness");
|
||||||
|
} else {
|
||||||
|
pstrcpy(harnessbuf, sizeof(harnessbuf), "");
|
||||||
}
|
}
|
||||||
harness = harnessbuf;
|
harness = harnessbuf;
|
||||||
}
|
}
|
||||||
@ -1688,6 +1690,8 @@ int run_test(const char *filename, int index)
|
|||||||
if (p) {
|
if (p) {
|
||||||
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
|
snprintf(harnessbuf, sizeof(harnessbuf), "%.*s%s",
|
||||||
(int)(p - filename), filename, "test/harness");
|
(int)(p - filename), filename, "test/harness");
|
||||||
|
} else {
|
||||||
|
pstrcpy(harnessbuf, sizeof(harnessbuf), "");
|
||||||
}
|
}
|
||||||
harness = harnessbuf;
|
harness = harnessbuf;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user