From 1a21832cbb12c76d1abb0871f99bacab7c47eb15 Mon Sep 17 00:00:00 2001 From: Scott Ehlert Date: Thu, 17 Apr 2008 09:28:27 +0000 Subject: [PATCH] Gah, finalized the revised ILibrarySys::GetFileExtension() code --HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402077 --- core/systems/LibrarySys.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/systems/LibrarySys.cpp b/core/systems/LibrarySys.cpp index 5f5553ce..7d33b918 100644 --- a/core/systems/LibrarySys.cpp +++ b/core/systems/LibrarySys.cpp @@ -352,7 +352,7 @@ size_t LibrarySystem::PathFormat(char *buffer, size_t len, const char *fmt, ...) const char *LibrarySystem::GetFileExtension(const char *filename) { - size_t len, end, i; + size_t len, end; len = strlen(filename); @@ -364,7 +364,7 @@ const char *LibrarySystem::GetFileExtension(const char *filename) end = len - 1; - for (i = end; i <= end; i--) + for (size_t i = end; i <= end; i--) { if (filename[i] == PLATFORM_SEP_CHAR || filename[i] == PLATFORM_SEP_ALTCHAR) {