summaryrefslogtreecommitdiff
path: root/Source/Tools/MakeRamFS
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Tools/MakeRamFS')
-rwxr-xr-xSource/Tools/MakeRamFS/MakeRamFSbin12236 -> 12483 bytes
-rw-r--r--Source/Tools/MakeRamFS/main.cpp9
2 files changed, 7 insertions, 2 deletions
diff --git a/Source/Tools/MakeRamFS/MakeRamFS b/Source/Tools/MakeRamFS/MakeRamFS
index 43a628b..be1dc1a 100755
--- a/Source/Tools/MakeRamFS/MakeRamFS
+++ b/Source/Tools/MakeRamFS/MakeRamFS
Binary files differ
diff --git a/Source/Tools/MakeRamFS/main.cpp b/Source/Tools/MakeRamFS/main.cpp
index df1f0d8..dcb2a2b 100644
--- a/Source/Tools/MakeRamFS/main.cpp
+++ b/Source/Tools/MakeRamFS/main.cpp
@@ -50,6 +50,7 @@ int main(int argc, char *argv[]) {
fhdr.file_length = 0; //File length of 0 means directory
output.write((char*)&fhdr, sizeof(ramfs_file_header));
output << name;
+ output << '\0';
continue;
}
@@ -75,10 +76,14 @@ int main(int argc, char *argv[]) {
output.write((char*)&fhdr, sizeof(ramfs_file_header));
output << name;
+ output << '\0';
char *c = new char[fhdr.file_length];
- infile.read(c, fhdr.file_length);
- output.write(c, fhdr.file_length);
+ for (int i = 0; i < fhdr.file_length; i++) {
+ char ch;
+ infile.read(&ch, 1);
+ output.write(&ch, 1);
+ }
delete [] c;
infile.close();