comparison gui/dialog/fileselect.c @ 35850:95ff5695a70b

Change condition. The index can't be greater than FF_ARRAY_ELEMS(fsHistory).
author ib
date Sun, 10 Mar 2013 14:26:48 +0000
parents 4d8a46729aea
children 3ad8e723bb09
comparison
equal deleted inserted replaced
35849:4d8a46729aea 35850:95ff5695a70b
394 if ( gstrcmp( fsHistory[i],subject ) == 0 ) 394 if ( gstrcmp( fsHistory[i],subject ) == 0 )
395 { 395 {
396 entry=fsHistory[i]; 396 entry=fsHistory[i];
397 break; 397 break;
398 } 398 }
399 if ( i >= FF_ARRAY_ELEMS(fsHistory) ) 399 if ( i == FF_ARRAY_ELEMS(fsHistory) )
400 { 400 {
401 i=FF_ARRAY_ELEMS(fsHistory)-1; 401 i=FF_ARRAY_ELEMS(fsHistory)-1;
402 nfree( fsHistory[i] ); 402 nfree( fsHistory[i] );
403 entry=strdup( subject ); 403 entry=strdup( subject );
404 } 404 }