summaryrefslogtreecommitdiff
path: root/PE/rebuildmenus.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PE/rebuildmenus.cpp')
-rw-r--r--PE/rebuildmenus.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/PE/rebuildmenus.cpp b/PE/rebuildmenus.cpp
index 76b3e97..681e909 100644
--- a/PE/rebuildmenus.cpp
+++ b/PE/rebuildmenus.cpp
@@ -4,7 +4,7 @@
CODE_BEGINS
virtual int startup(void) throw (GeneralException) {
- int i, p;
+ int i, j, p, s;
Handle * inter = new Output("concat.out");
Handle * f, * out;
String fname;
@@ -18,6 +18,7 @@ virtual int startup(void) throw (GeneralException) {
for (i = 0; i < 4; i++) {
fname = "menus" + String(i) + ".out";
f = new Input(fname);
+ s = f->GetSize();
p = inter->tell();
@@ -27,6 +28,14 @@ virtual int startup(void) throw (GeneralException) {
copy(f, inter);
+ s &= 3;
+
+ if (s) {
+ s = 4 - s;
+ for (j = 0; j < s; j++)
+ inter->writeU8(0);
+ }
+
delete f;
}