diff --git a/ChangeLog b/ChangeLog index e0c41ebc5f000cfbb6f9704a570ce8c401ab064d..a71d9eecd7d47d763cca5835d88892974aa09ce8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -33,6 +33,9 @@ CVS code - the file list display after returning from the help browser at the "Go To Directory" prompt. (DLR) - Rename variable j to i, for consistency. (DLR) + - Make fileline and the static selected size_t's, since the + latter can hold the value of the former, and the former can be + that large. (DLR) - chars.c: mbstrchr() - Make parameter c const. (DLR) diff --git a/src/browser.c b/src/browser.c index 65ce82e0a9dcc2fcfd93c50aad59f869b253ea4e..943f43f16673667d808001bd0115e672bb516139 100644 --- a/src/browser.c +++ b/src/browser.c @@ -38,7 +38,7 @@ static int width = 0; /* The number of columns to display the list in. */ static int longest = 0; /* The number of columns in the longest filename in the list. */ -static int selected = 0; +static size_t selected = 0; /* The currently selected filename in the list. */ /* Our browser function. path is the path to start browsing from. @@ -89,7 +89,8 @@ char *do_browser(char *path, DIR *dir) do { bool abort = FALSE; struct stat st; - int i, fileline; + int i; + size_t fileline; char *new_path; /* Used by the "Go To Directory" prompt. */ #ifndef DISABLE_MOUSE