From: david Date: Thu, 9 May 2002 21:15:01 +0000 (+0000) Subject: Patch from Jim Wilson: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=26e4ae9fc4e960f97cb942a50bebe40ae0fe68f8;p=flightgear.git Patch from Jim Wilson: Turns out it was a problem with a long string, not the font. Plib is limited to 80 characters in things like this listbox. BTW I checked and all the fonts are missing those characters. So, no point in changing. Description: Fixed segfault caused by long string. --- diff --git a/src/GUI/prop_picker.cxx b/src/GUI/prop_picker.cxx index dbb99615b..38002a0a6 100755 --- a/src/GUI/prop_picker.cxx +++ b/src/GUI/prop_picker.cxx @@ -500,6 +500,11 @@ void fgPropPicker::find_props () ++pi; } + // truncate entries to 80 characters (plib pui limit) + for (i = 0; i < num_files; i++) { + if (strlen(files[i]) > 80) files[i][79] = '\0'; + } + files [ num_files ] = NULL ; // leave the . and .. alone... @@ -607,3 +612,4 @@ fgPropEdit::fgPropEdit ( char *name, char *value, char *proppath ) : puDialogBox FG_FINALIZE_PUI_DIALOG( this ); } +