]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fixed PCX file loading for images with an odd width
authormolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 26 Jul 2002 06:18:16 +0000 (06:18 +0000)
committermolivier <molivier@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 26 Jul 2002 06:18:16 +0000 (06:18 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2093 d7cf8633-e32d-0410-b094-e92efae38249

image.c

diff --git a/image.c b/image.c
index 2023b0ae3096d026fcf14c86620101c9d70308bd..f36e975d75627102d3369bd847a72316a384a330 100644 (file)
--- a/image.c
+++ b/image.c
@@ -159,6 +159,7 @@ qbyte* LoadPCX (qbyte *f, int matchwidth, int matchheight)
                        else
                                a[x++] = dataByte;
                }
+               fin += pcx.bytes_per_line - image_width; // the number of bytes per line is always forced to an even number
                while(x < image_width)
                        a[x++] = 0;
        }