From 09d57b679e6be941591bc597715cd6fcfc6f1267 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Mon, 4 Jun 2007 11:43:47 +0000 Subject: [PATCH] C fallback for SDL_revcpy() was off by one. Thanks to Emmanuel Jeandel for the catch. Fixes Bugzilla #424. --HG-- branch : SDL-1.2 --- src/stdlib/SDL_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c index 8c44e6d69..0ab5af6bb 100644 --- a/src/stdlib/SDL_string.c +++ b/src/stdlib/SDL_string.c @@ -289,8 +289,8 @@ void *SDL_revcpy(void *dst, const void *src, size_t len) { char *srcp = (char *)src; char *dstp = (char *)dst; - srcp += len; - dstp += len; + srcp += len-1; + dstp += len-1; while ( len-- ) { *dstp-- = *srcp--; }