Fix passing of non-primitive types to varargs functions

This commit is contained in:
Ben Payne 2015-03-04 16:00:02 -05:00
parent 7d809a0d28
commit da4078c707
2 changed files with 4 additions and 4 deletions

View file

@ -1409,9 +1409,9 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
if( ( subPath && ( dStrncmp( subPath, "", 1 ) != 0 ) )) if( ( subPath && ( dStrncmp( subPath, "", 1 ) != 0 ) ))
{ {
if( subTrail == '/' ) if( subTrail == '/' )
dSprintf(search, search.size, "%s%s", subPath, fileName); dSprintf(search, search.size, "%s%s", subPath, fileName.ptr);
else else
dSprintf(search, search.size, "%s/%s", subPath, fileName); dSprintf(search, search.size, "%s/%s", subPath, fileName.ptr);
char* child = search; char* child = search;
if( currentDepth < recurseDepth || recurseDepth == -1 ) if( currentDepth < recurseDepth || recurseDepth == -1 )
@ -1425,7 +1425,7 @@ static bool recurseDumpDirectories(const char *basePath, const char *subPath, Ve
child = fileName; child = fileName;
else else
{ {
dSprintf(search, search.size, "/%s", fileName); dSprintf(search, search.size, "/%s", fileName.ptr);
child = search; child = search;
} }

View file

@ -79,7 +79,7 @@ ConsoleFunction( mathInit, void, 1, 10, "( ... )"
properties |= CPU_PROP_SSE; properties |= CPU_PROP_SSE;
continue; continue;
} }
Con::printf("Error: MathInit(): ignoring unknown math extension '%s'", *argv); Con::printf("Error: MathInit(): ignoring unknown math extension '%s'", argv->getStringValue());
} }
Math::init(properties); Math::init(properties);
} }