diff options
Diffstat (limited to 'common/util.cpp')
-rw-r--r-- | common/util.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/common/util.cpp b/common/util.cpp index fc5fe9a4e5..b38dfa6664 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -592,3 +592,16 @@ void CDECL warning(const char *s, ...) { #endif #endif } + +char *scumm_strrev(char *str) { + if (!str) + return str; + int len = strlen(str); + if (len < 2) + return str; + char *p1, *p2; + for (p1 = str, p2 = str + len - 1; p1 < p2; p1++, p2--) { + SWAP(*p1, *p2); + } + return str; +} |