ref: e766ed71f819c1e22bdb05d93a369f07759c2dfc
parent: 11bcefd541160e6021347086251cea384a215d61
author: Tor Andersson <[email protected]>
date: Tue Feb 25 06:32:18 EST 2014
Always open files in binary mode. Fix for win32 where CRLF and text mode wreaks havoc with fseek/ftell.
--- a/jsstate.c
+++ b/jsstate.c
@@ -29,7 +29,7 @@
char *s;
int n, t;
- f = fopen(filename, "r");
+ f = fopen(filename, "rb");
if (!f) {
js_error(J, "cannot open file: '%s'", filename);
}