From 2d2ab89a1da10c29d4a5d7795f0d41df68e87012 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" <icculus@icculus.org> 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 extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402333 --- 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 8c44e6d6..0ab5af6b 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--; } -- 2.18.1