And use the unknown file colour if there is no extension

Change-Id: I35e16643fa655b7d1e006ea85be5c351427bca14
This commit is contained in:
Jonathan Gordon 2013-01-21 09:38:19 +11:00
parent 3b6b5130c9
commit 0c87e02631

View file

@ -514,7 +514,7 @@ int filetype_get_color(const char * name, int attr)
return custom_colors[0];
extension = strrchr(name, '.');
if (!extension)
return custom_colors[MAX_FILETYPES];
return custom_colors[unknown_file.color];
extension++;
i = find_extension(extension);