diff --git a/src/r_patch.c b/src/r_patch.c index 209b7e017..21f59401c 100644 --- a/src/r_patch.c +++ b/src/r_patch.c @@ -336,7 +336,7 @@ patch_t *Patch_Create(softwarepatch_t *source, size_t srcsize, void *dest) if (source) { INT32 col, colsize; - size_t size = sizeof(INT32) * source->width; + size_t size = sizeof(INT32) * SHORT(source->width); size_t offs = (sizeof(INT16) * 4) + size; patch->width = SHORT(source->width);