It doesn't take the null into account of the field width.

This commit is contained in:
Steve Checkoway
2006-07-24 09:54:47 +00:00
parent 5b3be8c9fa
commit e80defc8df
+3 -3
View File
@@ -185,7 +185,7 @@ void Model::LoadMaterialsFromMilkshapeAscii( const RString &_sPath )
// name
if( f.GetLine( sLine ) <= 0 )
THROW;
if( sscanf(sLine, "\"%256[^\"]\"", szName) != 1 )
if( sscanf(sLine, "\"%255[^\"]\"", szName) != 1 )
THROW;
Material.sName = szName;
@@ -241,7 +241,7 @@ void Model::LoadMaterialsFromMilkshapeAscii( const RString &_sPath )
if( f.GetLine( sLine ) <= 0 )
THROW;
strcpy( szName, "" );
sscanf( sLine, "\"%256[^\"]\"", szName );
sscanf( sLine, "\"%255[^\"]\"", szName );
RString sDiffuseTexture = szName;
if( sDiffuseTexture == "" )
@@ -268,7 +268,7 @@ void Model::LoadMaterialsFromMilkshapeAscii( const RString &_sPath )
if( f.GetLine( sLine ) <= 0 )
THROW;
strcpy( szName, "" );
sscanf( sLine, "\"%256[^\"]\"", szName );
sscanf( sLine, "\"%255[^\"]\"", szName );
RString sAlphaTexture = szName;
if( sAlphaTexture == "" )