Skip to content
Browse files

Removed spurious force to even length

  • Loading branch information...
1 parent 2771e0c commit 04c2729dbe835837aa5e03fa8574a782cafb9929 @makestuff committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 util.c
View
6 util.c
@@ -62,12 +62,10 @@ DLLEXPORT(uint8*) flLoadFile(const char *name, uint32 *length) {
return NULL;
}
returnCode = fread(buffer, 1, fileLen, file);
- if ( returnCode == fileLen ) {
- if ( fileLen & 1 ) {
- fileLen++;
- }
+ if ( returnCode == fileLen && length != NULL ) {
*length = (uint32)fileLen;
}
+ buffer[fileLen] = '\0';
fclose(file);
return buffer;
}

0 comments on commit 04c2729

Please sign in to comment.
Something went wrong with that request. Please try again.