From b694a78f62a02253bca2a5611314599ae7fce725 Mon Sep 17 00:00:00 2001 From: Littleboy Date: Thu, 23 Jun 2011 05:42:48 -0400 Subject: ANALYSIS: Add static casts to is* functions This fixes a potential problem with passing char values that would be sign-extended and yield unexpected results. See http://msdn.microsoft.com/en-us/library/ms245348.aspx --- engines/sword1/animation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/sword1') diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index 4ce3e2e88d..f19efd2635 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -114,7 +114,7 @@ bool MoviePlayer::load(uint32 id) { int startFrame = strtoul(ptr, const_cast(&ptr), 10); int endFrame = strtoul(ptr, const_cast(&ptr), 10); - while (*ptr && isspace(*ptr)) + while (*ptr && isspace(static_cast(*ptr))) ptr++; if (startFrame > endFrame) { -- cgit v1.2.3