chain: Just assign the value rather than using memcpy()
authorGene Cumm <gene.cumm@gmail.com>
Sun, 1 Aug 2010 16:39:19 +0000 (12:39 -0400)
committerGene Cumm <gene.cumm@gmail.com>
Sun, 1 Aug 2010 17:02:35 +0000 (13:02 -0400)
com32/modules/chain.c

index 1893eb3..15c181c 100644 (file)
@@ -1720,10 +1720,7 @@ int main(int argc, char *argv[])
            /* ds:[bp+28] must be 0x0000003f */
            regs.ds = (tsize >> 4) + (opt.seg - 2);
            /* "Patch" into the extra row */
-           if (!memcpy(data[ndata].data + tsize - 4, "\x3f\0\0\0", 4)) {
-               error("Failed to patch DRMK\n");
-               goto bail;
-           }
+           *(int *)(data[ndata].data + tsize - 4) = 0x0000003f;
        }
 
        ndata++;