![]() |
2012-04-14
, 14:29
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#3
|
counter<= (sizeof(xxx)-0
counter< (sizeof(xxx)-1
![]() |
2012-04-14
, 16:10
|
|
Posts: 381 |
Thanked: 336 times |
Joined on Jan 2011
@ Stockholm, Sweden
|
#4
|
xxx must be NULL terminated for the line after the pink code to not randomly crash. The pink code doesn't guarantee that. So, you might actually want to change:
toCode:counter<= (sizeof(xxx)-0
Code:counter< (sizeof(xxx)-1
![]() |
2012-04-14
, 18:28
|
|
Posts: 2,427 |
Thanked: 2,986 times |
Joined on Dec 2007
|
#5
|
char *mime_icon_name=NULL;
char mime_icon_name[50];
![]() |
2012-04-14
, 19:21
|
|
Posts: 381 |
Thanked: 336 times |
Joined on Jan 2011
@ Stockholm, Sweden
|
#6
|
mime_icon_name=NULL; if ((mime_icon_name=strrchr(fullpath, '.'))==0) mime_icon_name=g_strconcat (".noext-exe","\0",NULL); mime_icon_name=g_strconcat (".noext","\0",NULL);
.. && (mime_icon_name[counter]!=0) mychar=mime_icon_name[counter]; xxx[counter]=(tolower(mychar));
![]() |
2012-04-14
, 23:53
|
|
Posts: 381 |
Thanked: 336 times |
Joined on Jan 2011
@ Stockholm, Sweden
|
#7
|
if (mime_icon_name!=NULL){ ...}
The Following User Says Thank You to electroaudio For This Useful Post: | ||
When the code in pink is commented out, then the routine seem to work very well, but when the part in pink is part of the compilation, then the program will crash (sort of..) randomly with error sigsegv-11
Deskypplet , a desktop for N900 *RIP*
Last edited by electroaudio; 2012-04-14 at 23:56.