-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There was another 64-bit bug in here, causing the error message "Bitmap not monochrome, 16, 256, 16bit, 24bit or 32bit color".
- Loading branch information
1 parent
6754945
commit 33a01e6
Showing
3 changed files
with
96 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
diff -ur pilrc-3.2-orig/bitmap.c pilrc-3.2/bitmap.c | ||
--- ../pilrc-3.2-orig/bitmap.c 2025-02-12 22:04:24 | ||
+++ bitmap.c 2025-02-12 22:10:01 | ||
@@ -33,6 +33,7 @@ | ||
#include <stdlib.h> | ||
#include <stdio.h> | ||
#include <stddef.h> | ||
+#include <stdint.h> | ||
#include <string.h> | ||
#include <ctype.h> | ||
#include "pilrc.h" | ||
@@ -57,36 +58,36 @@ | ||
|
||
typedef struct BITMAPFILEHEADER | ||
{ | ||
- PILRC_USHORT bfType; | ||
- PILRC_USHORT bfSize1; | ||
- PILRC_USHORT bfSize2; | ||
- PILRC_USHORT bfReserved1; | ||
- PILRC_USHORT bfReserved2; | ||
- PILRC_USHORT bfOffBits1; | ||
- PILRC_USHORT bfOffBits2; | ||
+ uint16_t bfType; | ||
+ uint16_t bfSize1; | ||
+ uint16_t bfSize2; | ||
+ uint16_t bfReserved1; | ||
+ uint16_t bfReserved2; | ||
+ uint16_t bfOffBits1; | ||
+ uint16_t bfOffBits2; | ||
} BITMAPFILEHEADER; | ||
|
||
typedef struct BITMAPINFOHEADER | ||
{ | ||
- PILRC_ULONG biSize; | ||
- long biWidth; | ||
- long biHeight; | ||
- PILRC_USHORT biPlanes; | ||
- PILRC_USHORT biBitCount; | ||
- PILRC_ULONG biCompression; | ||
- PILRC_ULONG biSizeImage; | ||
- long biXPelsPerMeter; | ||
- long biYPelsPerMeter; | ||
- PILRC_ULONG biClrUsed; | ||
- PILRC_ULONG biClrImportant; | ||
+ uint32_t biSize; | ||
+ int32_t biWidth; | ||
+ int32_t biHeight; | ||
+ uint16_t biPlanes; | ||
+ uint16_t biBitCount; | ||
+ uint32_t biCompression; | ||
+ uint32_t biSizeImage; | ||
+ int32_t biXPelsPerMeter; | ||
+ int32_t biYPelsPerMeter; | ||
+ uint32_t biClrUsed; | ||
+ uint32_t biClrImportant; | ||
} BITMAPINFOHEADER; | ||
|
||
typedef struct RGBQUAD | ||
{ | ||
- PILRC_BYTE rgbBlue; | ||
- PILRC_BYTE rgbGreen; | ||
- PILRC_BYTE rgbRed; | ||
- PILRC_BYTE rgbReserved; | ||
+ uint8_t rgbBlue; | ||
+ uint8_t rgbGreen; | ||
+ uint8_t rgbRed; | ||
+ uint8_t rgbReserved; | ||
} RGBQUAD; | ||
|
||
typedef struct BITMAPINFO | ||
diff -ur pilrc-3.2-orig/util.c pilrc-3.2/util.c | ||
--- ../pilrc-3.2-orig/util.c 2025-02-12 22:04:24 | ||
+++ util.c 2025-02-12 22:10:41 | ||
@@ -35,6 +35,7 @@ | ||
#endif | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
+#include <stdint.h> | ||
#include <string.h> | ||
#include <ctype.h> | ||
#include <errno.h> | ||
@@ -73,9 +74,9 @@ | ||
DEFPL(PLEXRESOURCEDIR) | ||
typedef struct RESOURCEDIRENTRY | ||
{ | ||
- int type[4]; | ||
- int id; | ||
- int offset; | ||
+ p_int type[4]; | ||
+ p_int id; | ||
+ p_int offset; | ||
} RESOURCEDIRENTRY; | ||
|
||
#define szRESOURCEDIRENTRY "b4,w,l" |
This file was deleted.
Oops, something went wrong.