encode/decode windowze fix

This commit is contained in:
p.kosyh 2009-10-31 13:43:25 +00:00
parent b0bbedb343
commit 203f2baf1e
2 changed files with 5 additions and 5 deletions

View file

@ -265,7 +265,7 @@ static int loadfile (lua_State *L, const char *filename) {
int fnameindex = lua_gettop(L) + 1; /* index of filename on the stack */
lf.extraline = 0;
lua_pushfstring(L, "@%s", filename);
lf.f = fopen(filename, "r");
lf.f = fopen(filename, "rb");
lf.byte = 0xcc;
if (lf.f == NULL) return errfile(L, "open", fnameindex);
status = lua_load(L, getF, &lf, lua_tostring(L, -1));
@ -358,12 +358,12 @@ int instead_encode(const char *s, const char *d)
unsigned char byte = 0xcc;
unsigned char buff[4096];
src = fopen(s, "r");
src = fopen(s, "rb");
if (!src) {
fprintf(stderr,"Can't open on read: '%s'.\n", s);
return -1;
}
dst = fopen(d, "w");
dst = fopen(d, "wb");
if (!dst) {
fprintf(stderr,"Can't open on write: '%s'.\n", s);
return -1;

View file

@ -33,8 +33,8 @@ inv.y = 16
inv.w = 127
inv.h = 508
;scr.gfx.mode = fixed
;scr.gfx.h = 300
scr.gfx.mode = fixed
scr.gfx.h = 300
win.gfx.down = down.png
win.gfx.up = up.png