commands/CmdWizard.c: %x => (intmax_t) %lx

Wrong type of arguments to formatting function

Looks like SPICE comment, change maintains hex without 0x prefix in portable way.

Copilot Autofix rejected: TxPrintf("%p\n", tp);

CodeQL: https://github.com/dlmiles/magic/security/code-scanning/65
This commit is contained in:
Darryl L. Miles 2024-09-29 23:00:00 +01:00 committed by Tim Edwards
parent 4f5eb7da2d
commit 4359aa8d4b
1 changed files with 2 additions and 1 deletions

View File

@ -24,6 +24,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#endif /* not lint */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
@ -976,7 +977,7 @@ cmdTsrFunc(tp)
Tile *tp;
{
if (cmdTsearchDebug)
TxPrintf("%x\n", tp);
TxPrintf("%lx\n", (intmax_t) tp);
numTilesFound++;
return 0;
}