mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-25 22:20:49 +08:00
Merge pull request #2991 from cesanta/unpacked_crash
Fix mg_unpacked() crash
This commit is contained in:
commit
7b296fabb0
@ -977,7 +977,8 @@ struct packed_file {
|
||||
#if MG_ENABLE_PACKED_FS
|
||||
#else
|
||||
const char *mg_unpack(const char *path, size_t *size, time_t *mtime) {
|
||||
*size = 0, *mtime = 0;
|
||||
if (size != NULL) *size = 0;
|
||||
if (mtime != NULL) *mtime = 0;
|
||||
(void) path;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -11,7 +11,8 @@ struct packed_file {
|
||||
#if MG_ENABLE_PACKED_FS
|
||||
#else
|
||||
const char *mg_unpack(const char *path, size_t *size, time_t *mtime) {
|
||||
*size = 0, *mtime = 0;
|
||||
if (size != NULL) *size = 0;
|
||||
if (mtime != NULL) *mtime = 0;
|
||||
(void) path;
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user