Skip to content
Permalink
Browse files

Fix undefined behavior for ReadColor

  • Loading branch information...
botder committed Jul 26, 2019
1 parent 80fe718 commit 53121a3b3084b7e503d57be122f8649dd0bb09a8
Showing with 2 additions and 2 deletions.
  1. +2 −2 Shared/sdk/CScriptArgReader.h
@@ -479,7 +479,7 @@ class CScriptArgReader
ReadNumber(color);

if (!m_bError)
outValue = static_cast<unsigned int>(color);
outValue = static_cast<unsigned long>(static_cast<int64_t>(color));
}

//
@@ -491,7 +491,7 @@ class CScriptArgReader
ReadNumber(color, static_cast<lua_Number>(defaultValue));

if (!m_bError)
outValue = static_cast<unsigned int>(color);
outValue = static_cast<unsigned long>(static_cast<int64_t>(color));
}

//

0 comments on commit 53121a3

Please sign in to comment.
You can’t perform that action at this time.