Skip to content

Commit

Permalink
It fixes compilation errors in some systems.
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonKnightOA committed Nov 14, 2018
1 parent fd3cd64 commit e378a87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions libs/picomodel/picointernal.c
Expand Up @@ -733,8 +733,10 @@ void _pico_deduce_shadername( const char* fileName, const char* srcName, picoSha
}

/* deduce shadernames from bitmap or shadername paths */
void _pico_deduce_shadernames( picoModel_t *model ){
for ( int i = 0; i < model->numShaders; ++i ){
void _pico_deduce_shadernames( picoModel_t *model )
{
int i;
for ( i = 0; i < model->numShaders; ++i ){
/* skip null shaders */
if ( model->shader[i] == NULL )
continue;
Expand Down
4 changes: 3 additions & 1 deletion libs/picomodel/picomodel.c
Expand Up @@ -493,13 +493,15 @@ void PicoFreeShader( picoShader_t *shader ){
*/

picoShader_t *PicoFindShader( picoModel_t *model, char *name, int caseSensitive ){
int i;

/* sanity checks */
if ( model == NULL || name == NULL ) { /* sea: null name fix */
return NULL;
}

/* 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 */
if ( model->shader[ i ] == NULL ||
Expand Down

0 comments on commit e378a87

Please sign in to comment.