mirror of
https://github.com/joel16/VitaShell.git
synced 2025-03-01 16:45:33 +00:00
Merge pull request #250 from devnoname120/patch-1
Display '0x' for hexa values in the SFO reader
This commit is contained in:
commit
8116312012
30
sfo.c
30
sfo.c
@ -17,7 +17,7 @@
|
||||
*/
|
||||
|
||||
#include "main.h"
|
||||
#include "archive.h"
|
||||
#include "archive.h"
|
||||
#include "archiveRAR.h"
|
||||
#include "file.h"
|
||||
#include "text.h"
|
||||
@ -109,19 +109,19 @@ int SFOReader(const char *file) {
|
||||
|
||||
int size = 0;
|
||||
|
||||
if (isInArchive()) {
|
||||
enum FileTypes archiveType = getArchiveType();
|
||||
switch(archiveType){
|
||||
case FILE_TYPE_ZIP:
|
||||
size = ReadArchiveFile(file, buffer, BIG_BUFFER_SIZE);
|
||||
break;
|
||||
case FILE_TYPE_RAR:
|
||||
size = ReadArchiveRARFile(file,buffer,BIG_BUFFER_SIZE);
|
||||
break;
|
||||
default:
|
||||
size = -1;
|
||||
break;
|
||||
}
|
||||
if (isInArchive()) {
|
||||
enum FileTypes archiveType = getArchiveType();
|
||||
switch(archiveType){
|
||||
case FILE_TYPE_ZIP:
|
||||
size = ReadArchiveFile(file, buffer, BIG_BUFFER_SIZE);
|
||||
break;
|
||||
case FILE_TYPE_RAR:
|
||||
size = ReadArchiveRARFile(file,buffer,BIG_BUFFER_SIZE);
|
||||
break;
|
||||
default:
|
||||
size = -1;
|
||||
break;
|
||||
}
|
||||
}else {
|
||||
size = ReadFile(file, buffer, BIG_BUFFER_SIZE);
|
||||
}
|
||||
@ -194,7 +194,7 @@ int SFOReader(const char *file) {
|
||||
break;
|
||||
|
||||
case PSF_TYPE_VAL:
|
||||
snprintf(string, sizeof(string), "%X", *(unsigned int *)data);
|
||||
snprintf(string, sizeof(string), "0x%X", *(unsigned int *)data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user