From e378a87134d74b66f33edb6e95f14395e248a887 Mon Sep 17 00:00:00 2001 From: Neon_Knight Date: Wed, 14 Nov 2018 20:59:37 -0300 Subject: [PATCH] It fixes compilation errors in some systems. --- libs/picomodel/picointernal.c | 6 ++++-- libs/picomodel/picomodel.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libs/picomodel/picointernal.c b/libs/picomodel/picointernal.c index 07967bf1..180cae13 100644 --- a/libs/picomodel/picointernal.c +++ b/libs/picomodel/picointernal.c @@ -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; diff --git a/libs/picomodel/picomodel.c b/libs/picomodel/picomodel.c index a5931843..ac4b99f0 100644 --- a/libs/picomodel/picomodel.c +++ b/libs/picomodel/picomodel.c @@ -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 ||