Use "const char *" instead of "const uint8_t *" in Str_FindInMem (for strlen())

This commit is contained in:
Nicolas Pomarède committed 2026-05-25 23:01:53 +02:00
1 parent c84630e97d
commit 560550b65b
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -277,7 +277,7 @@ bool KFS_Insert ( int Drive , const char *FilenameKFS , uint8_t *pImageBuffer ,
if ( p )
{
/* Basic check : raw track has "KryoFlux" string in the 1st 200 bytes in OOB "info" */
if ( Str_FindInMem ( (const uint8_t *)"KryoFlux" , p , 200 ) == NULL )
if ( Str_FindInMem ( "KryoFlux" , p , 200 ) == NULL )
{
Log_Printf ( LOG_ERROR , "KFS : no Kryoflux signature in raw stream drive=%d track=%d side=%d %s\n" , Drive , Track , Side , TrackFileName );
free(p);
+1 -1
View File
@@ -44,7 +44,7 @@ extern char *Str_Dup(const char *str);
extern long Str_Copy(char *pDest, const char *pSrc, long nBufLen);
extern char *Str_Trunc(char *str);
extern bool Str_IsHex(const char *str);
extern uint8_t *Str_FindInMem(const uint8_t *pString , uint8_t *Mem , int MemLen);
extern uint8_t *Str_FindInMem(const char *pString , uint8_t *Mem , int MemLen);
extern void Str_UnEscape(char *str);
extern void Str_Dump_Hex_Ascii ( char *p , int Len , int Width , const char *Suffix , FILE *pFile );
+1 -1
View File
@@ -206,7 +206,7 @@ bool Str_IsHex(const char *str)
/**
* Search for a string (\0 terminated) into a memory region
*/
uint8_t *Str_FindInMem(const uint8_t *pString , uint8_t *Mem , int MemLen)
uint8_t *Str_FindInMem(const char *pString , uint8_t *Mem , int MemLen)
{
uint8_t *p;
int StringLen = strlen(pString);