It fixes compilation errors in some systems.

This commit is contained in:
Neon_Knight 2018-11-14 20:59:37 -03:00
parent fd3cd64c35
commit e378a87134
2 changed files with 7 additions and 3 deletions

View File

@ -733,8 +733,10 @@ void _pico_deduce_shadername( const char* fileName, const char* srcName, picoSha
} }
/* deduce shadernames from bitmap or shadername paths */ /* deduce shadernames from bitmap or shadername paths */
void _pico_deduce_shadernames( picoModel_t *model ){ void _pico_deduce_shadernames( picoModel_t *model )
for ( int i = 0; i < model->numShaders; ++i ){ {
int i;
for ( i = 0; i < model->numShaders; ++i ){
/* skip null shaders */ /* skip null shaders */
if ( model->shader[i] == NULL ) if ( model->shader[i] == NULL )
continue; continue;

View File

@ -493,13 +493,15 @@ void PicoFreeShader( picoShader_t *shader ){
*/ */
picoShader_t *PicoFindShader( picoModel_t *model, char *name, int caseSensitive ){ picoShader_t *PicoFindShader( picoModel_t *model, char *name, int caseSensitive ){
int i;
/* sanity checks */ /* sanity checks */
if ( model == NULL || name == NULL ) { /* sea: null name fix */ if ( model == NULL || name == NULL ) { /* sea: null name fix */
return NULL; return NULL;
} }
/* walk list */ /* walk list */
for ( int i = 0; i < model->numShaders; i++ ) for ( i = 0; i < model->numShaders; i++ )
{ {
/* skip null shaders or shaders with null names */ /* skip null shaders or shaders with null names */
if ( model->shader[ i ] == NULL || if ( model->shader[ i ] == NULL ||