mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-21 22:11:22 +03:00
split-messages: Handle gzprintf failing
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
926e560716
commit
2b2469df7e
@ -500,13 +500,21 @@ message_write(struct param *param, struct trnsltn_entry *tlist)
|
||||
return NSERROR_PERMISSION;
|
||||
}
|
||||
|
||||
gzprintf(outf,
|
||||
if (gzprintf(outf,
|
||||
"# This messages file is automatically generated from %s\n"
|
||||
"# at build-time. Please go and edit that instead of this.\n\n",
|
||||
param->infilename);
|
||||
param->infilename) < 1) {
|
||||
gzclose(outf);
|
||||
unlink(param->outfilename);
|
||||
return NSERROR_NOSPACE;
|
||||
};
|
||||
|
||||
while (tlist != NULL) {
|
||||
gzprintf(outf, "%s:%s\n", tlist->key, tlist->value);
|
||||
if (gzprintf(outf, "%s:%s\n", tlist->key, tlist->value) < 1) {
|
||||
gzclose(outf);
|
||||
unlink(param->outfilename);
|
||||
return NSERROR_NOSPACE;
|
||||
}
|
||||
tlist = tlist->next;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user