Merged r3047:3048 from branches/SDL-1.2: SDL_revcpy() off-by-one fix.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 04 Jun 2007 11:45:10 +0000
changeset 2114 4794e6f90feb
parent 2113 6264c973814a
child 2115 502ae1f2a577
Merged r3047:3048 from branches/SDL-1.2: SDL_revcpy() off-by-one fix.
src/stdlib/SDL_string.c
--- a/src/stdlib/SDL_string.c	Mon Jun 04 11:17:46 2007 +0000
+++ b/src/stdlib/SDL_string.c	Mon Jun 04 11:45:10 2007 +0000
@@ -298,8 +298,8 @@
 {
     char *srcp = (char *) src;
     char *dstp = (char *) dst;
-    srcp += len;
-    dstp += len;
+    srcp += len-1;
+    dstp += len-1;
     while (len--) {
         *dstp-- = *srcp--;
     }