C fallback for SDL_revcpy() was off by one. Thanks to Emmanuel Jeandel for SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Mon, 04 Jun 2007 11:43:47 +0000
branchSDL-1.2
changeset 3953 d3c1161652d5
parent 3952 e3c28caea46d
child 3954 649fba69eccd
C fallback for SDL_revcpy() was off by one. Thanks to Emmanuel Jeandel for the catch. Fixes Bugzilla #424.
src/stdlib/SDL_string.c
--- a/src/stdlib/SDL_string.c	Mon Jun 04 11:22:23 2007 +0000
+++ b/src/stdlib/SDL_string.c	Mon Jun 04 11:43:47 2007 +0000
@@ -289,8 +289,8 @@
 {
     char *srcp = (char *)src;
     char *dstp = (char *)dst;
-    srcp += len;
-    dstp += len;
+    srcp += len-1;
+    dstp += len-1;
     while ( len-- ) {
         *dstp-- = *srcp--;
     }