diff options
author | Andrea Weikert <elubie@gmx.net> | 2009-05-26 22:54:39 +0400 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2009-05-26 22:54:39 +0400 |
commit | 3159f4a243c8f08db39ac42995a30f884daed649 (patch) | |
tree | 1f0273b64894c5e519bab1075626abf741e1e391 /source/blender | |
parent | c590dd3e8cd28013262c8a0036a7fef38b99a0a9 (diff) |
2.5 MSVC projectfiles update
- file editors/space_image/image_panels.c -> image_buttons.c (renamed)
- file editors/interface/interface_templates.c added
Also added small fix for crash in filebrowser.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/space_file/file_draw.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/editors/space_file/file_draw.c b/source/blender/editors/space_file/file_draw.c index 55b2910f769..1db950c8f97 100644 --- a/source/blender/editors/space_file/file_draw.c +++ b/source/blender/editors/space_file/file_draw.c @@ -187,7 +187,7 @@ static float shorten_string(char* string, float w, int flag) char *s = string; BLI_strncpy(temp, "...", 4); pad = file_string_width(temp); - while (s && (sw+pad>w)) { + while (s && *s && (w > 0) && (sw+pad>w)) { s++; sw = file_string_width(s); shortened = 1; @@ -200,11 +200,13 @@ static float shorten_string(char* string, float w, int flag) } } else { char *s = string; - while (sw>w) { - int slen = strlen(string); - string[slen-1] = '\0'; - sw = file_string_width(s); - shortened = 1; + if (w>0) { + while (sw>w) { + int slen = strlen(string); + string[slen-1] = '\0'; + sw = file_string_width(s); + shortened = 1; + } } if (shortened) { int slen = strlen(string); |