Fixed Linux build.
This commit is contained in:
parent
6ebbb48f9f
commit
037ea592ab
@ -76,7 +76,7 @@ ifeq "$(USEMETA)" "true"
|
||||
CFLAGS += -DSE_EPISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_LEFT4DEAD=4
|
||||
else
|
||||
INCLUDE += -I. -I.. -Isdk -I$(SMSDK)/public -I$(SMSDK)/public/sourcepawn \
|
||||
-I$(SMSDK)/public/extensions
|
||||
-I$(SMSDK)/public/extensions -I$(MMSOURCE17)/core/sourcehook
|
||||
endif
|
||||
|
||||
LINK += -m32 -lm -ldl
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include <sh_string.h>
|
||||
#include "MemoryDownloader.h"
|
||||
|
||||
using namespace SourceHook;
|
||||
|
||||
struct UpdatePart
|
||||
{
|
||||
UpdatePart* next;
|
||||
|
@ -159,12 +159,18 @@ static void PumpUpdate(void *data)
|
||||
AddUpdateError("Could not open %s for writing", path);
|
||||
return;
|
||||
}
|
||||
fwrite(part->data, 1, part->length, fp);
|
||||
if (fwrite(part->data, 1, part->length, fp) != part->length)
|
||||
{
|
||||
AddUpdateError("Could not write file %s", path);
|
||||
}
|
||||
else
|
||||
{
|
||||
smutils->LogMessage(myself,
|
||||
"Successfully updated gamedata file \"%s\"",
|
||||
part->file);
|
||||
new_files = true;
|
||||
}
|
||||
fclose(fp);
|
||||
smutils->LogMessage(myself,
|
||||
"Successfully updated gamedata file \"%s\"",
|
||||
part->file);
|
||||
new_files = true;
|
||||
}
|
||||
skip_create:
|
||||
temp = part->next;
|
||||
|
Loading…
Reference in New Issue
Block a user