[Fix] Pack file was using logical operator instead of asignment. :/
This commit is contained in:
parent
c15699606b
commit
2e78211acd
@ -19,4 +19,8 @@ joystick = "Precision"
|
||||
accel = { type = "jbutton", key = 0 }
|
||||
left = { type = "jaxis", key = 0 }
|
||||
right = { type = "jaxis", key = 0 }
|
||||
primary = { type = "jbutton", key = 1 }
|
||||
target = { type = "jbutton", key = 4 }
|
||||
mapzoomin = { type = "jbutton", key = 7 }
|
||||
mapzoomout = { type = "jbuton", key = 6 }
|
||||
|
||||
|
@ -1,22 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Factions>
|
||||
<faction id='1'>
|
||||
<name>Player</name>
|
||||
<faction name = "Player">
|
||||
</faction>
|
||||
<faction id='2'>
|
||||
<name>Noob Merchant</name>
|
||||
<faction name = "Merchant">
|
||||
</faction>
|
||||
<faction name = "Pirate">
|
||||
</faction>
|
||||
<alliances>
|
||||
</alliances>
|
||||
<enemies>
|
||||
<enemy>'3'</enemy>
|
||||
</enemies>
|
||||
<allies>
|
||||
</allies>
|
||||
</faction>
|
||||
<faction id='3'>
|
||||
<name>Pirate</name>
|
||||
<enemies>
|
||||
<enemy>2</enemy>
|
||||
</enemies>
|
||||
<allies>
|
||||
</allies>
|
||||
</faction>
|
||||
</Factions>
|
||||
|
14
src/pack.c
14
src/pack.c
@ -291,12 +291,6 @@ void* pack_readfile(const char* packfile, const char* filename, uint32_t* filesi
|
||||
return buf;
|
||||
}
|
||||
|
||||
// Close the packfile.
|
||||
int pack_close(Packfile* file) {
|
||||
int i = close(file->fd);
|
||||
return (i) ? -1 : 0;
|
||||
}
|
||||
|
||||
// Load the filenames int the packfile to filenames.
|
||||
// filenames should be freed after use
|
||||
// On error if filenames is (char**)-1.
|
||||
@ -332,8 +326,14 @@ void pack_listfiles(const char* packfile, char** filenames, uint32_t* nfiles) {
|
||||
while(filenames[i][j++] != '\0')
|
||||
READ(fd, &filenames[i][j], 1);
|
||||
}
|
||||
filenames[i] == NULL;
|
||||
filenames[i] = NULL;
|
||||
close(fd);
|
||||
}
|
||||
#undef READ
|
||||
|
||||
// Close the packfile.
|
||||
int pack_close(Packfile* file) {
|
||||
int i = close(file->fd);
|
||||
return (i) ? -1 : 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user