Skip to content

Commit

Permalink
Use size_t to store the result from strlen().
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45232 379a1393-f5fb-40a0-bcee-ef074d9b53f7
  • Loading branch information
Rhialto committed Jul 15, 2024
1 parent 2aa6f01 commit 6a8aff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vice/src/fsdevice/fsdevice-read.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,8 +450,8 @@ static void command_directory_get(vdrive_t *vdrive, bufinfo_t *bufinfo,
/* Handle ONE * followed by text but no more (like 1581):
* When at the * in A*XYZ, skip to 3 positions before
* the end of the file name to try to match XYZ. */
int rest_of_filename = strlen((const char *)p);
int rest_of_pattern = strlen(&bufinfo->dirmask[i + 1]);
size_t rest_of_filename = strlen((const char *)p);
size_t rest_of_pattern = strlen(&bufinfo->dirmask[i + 1]);

if (rest_of_filename < rest_of_pattern) {
break; /* no match: file name too short */
Expand Down

0 comments on commit 6a8aff9

Please sign in to comment.