]> git.sur5r.net Git - cc65/commitdiff
Fixed open mode for second try in DoIncBin (Greg King).
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 31 Jan 2010 20:49:40 +0000 (20:49 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 31 Jan 2010 20:49:40 +0000 (20:49 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4563 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/pseudo.c

index da34c85a0f289983b77cb5713d6209f3d4c7e98d..8c71e71b8682e9caccef9135765c54a263e2e592 100644 (file)
@@ -1115,7 +1115,7 @@ static void DoIncBin (void)
 
                /* Search for the file in the binary include directory */
        char* PathName = FindInclude (SB_GetConstBuf (&Name), INC_BIN);
-               if (PathName == 0 || (F = fopen (PathName, "r")) == 0) {
+               if (PathName == 0 || (F = fopen (PathName, "rb")) == 0) {
            /* Not found or cannot open, print an error and bail out */
                    ErrorSkip ("Cannot open include file `%m%p': %s", &Name, strerror (errno));
        }