mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Correct formatting for data and block types in fprintf().
This commit is contained in:
10
src/open.c
10
src/open.c
@@ -155,8 +155,7 @@ void *open(const char *filepath)
|
|||||||
|
|
||||||
for(int i = 0; i < idxHeader.entries; i++)
|
for(int i = 0; i < idxHeader.entries; i++)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr, "libdicformat: Block type %4.4s with data type %4.4s is indexed to be at %"PRIu64"",
|
||||||
"libdicformat: Block type %4s with data type %4s is indexed to be at %"PRIu64"",
|
|
||||||
(char *)&idxEntries[i].blockType,
|
(char *)&idxEntries[i].blockType,
|
||||||
(char *)&idxEntries[i].dataType,
|
(char *)&idxEntries[i].dataType,
|
||||||
idxEntries[i].offset);
|
idxEntries[i].offset);
|
||||||
@@ -220,15 +219,14 @@ void *open(const char *filepath)
|
|||||||
if(blockHeader.type != idxEntries[i].dataType)
|
if(blockHeader.type != idxEntries[i].dataType)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"libdicformat: Expected block with data type %4s at position %"PRIu64" but found data type %4s",
|
"libdicformat: Expected block with data type %4.4s at position %"PRIu64" but found data type %4.4s",
|
||||||
(char *)&idxEntries[i].blockType,
|
(char *)&idxEntries[i].blockType,
|
||||||
idxEntries[i].offset,
|
idxEntries[i].offset,
|
||||||
(char *)&blockHeader.type);
|
(char *)&blockHeader.type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stderr,
|
fprintf(stderr, "libdicformat: Found data block with type %4.4s at position %"PRIu64"",
|
||||||
"libdicformat: Found data block with type %4s at position %"PRIu64"",
|
|
||||||
(char *)&idxEntries[i].blockType,
|
(char *)&idxEntries[i].blockType,
|
||||||
idxEntries[i].offset);
|
idxEntries[i].offset);
|
||||||
|
|
||||||
@@ -580,7 +578,7 @@ void *open(const char *filepath)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"libdicformat: Unhandled block type %4s with data type %4s is indexed to be at %"PRIu64"",
|
"libdicformat: Unhandled block type %4.4s with data type %4.4s is indexed to be at %"PRIu64"",
|
||||||
(char *)&idxEntries[i].blockType,
|
(char *)&idxEntries[i].blockType,
|
||||||
(char *)&idxEntries[i].dataType,
|
(char *)&idxEntries[i].dataType,
|
||||||
idxEntries[i].offset);
|
idxEntries[i].offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user