Skip to content

Commit e2e7ff4

Browse files
committed
fix: [romimg] fix C23 strrchr argument
1 parent bd5e94d commit e2e7ff4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tools/romimg/src/romimg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,9 +467,9 @@ int AddFile(ROMIMG *ROMImg, const char *path, int upperconv)
467467
tbuf[sizeof(tbuf) - 1] = '\0';
468468
if (tbuf[0] != '\0') {
469469
upperbuff(tbuf);
470-
fname = tbuf;
471-
char* T = strrchr(fname, '.');
470+
char* T = strrchr(tbuf, '.');
472471
if (T != NULL) *T = '\0'; //null terminate extension
472+
fname = tbuf;
473473
}
474474
}
475475
int size;

0 commit comments

Comments
 (0)