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-10-01 12:36:13 -04:00
committed by Tim Edwards
parent 4f5eb7da2d
commit 4359aa8d4b
+2 -1
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;
}