misc edits
[blender.git] / source / blender / editors / space_file / file_draw.c
index 611bf79603e9b3f3a5dd760c97c9d9cad72ab1aa..85edcce35ca1b2a80e4d4fcb2a9b23df5a618669 100644 (file)
@@ -181,7 +181,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
 
                but = uiDefButTextO(block, TEX, "FILE_OT_directory", 0, "",
                                 min_x, line1_y, line1_w-chan_offs, btn_h, 
-                                params->dir, 0.0, (float)FILE_MAX-1, 0, 0, 
+                                params->dir, 0.0, (float)FILE_MAX, 0, 0,
                                 UI_translate_do_tooltip(N_("File path")));
                uiButSetCompleteFunc(but, autocomplete_directory, NULL);
                uiButSetFlag(but, UI_BUT_NO_UTF8);
@@ -189,7 +189,7 @@ void file_draw_buttons(const bContext *C, ARegion *ar)
                if((params->flag & FILE_DIRSEL_ONLY) == 0) {
                        but = uiDefBut(block, TEX, B_FS_FILENAME, "",
                                         min_x, line2_y, line2_w-chan_offs, btn_h,
-                                        params->file, 0.0, (float)FILE_MAXFILE-1, 0, 0,
+                                        params->file, 0.0, (float)FILE_MAXFILE, 0, 0,
                                         UI_translate_do_tooltip(overwrite_alert ?N_("File name, overwrite existing") : N_("File name")));
                        uiButSetCompleteFunc(but, autocomplete_file, NULL);
                        uiButSetFlag(but, UI_BUT_NO_UTF8);