mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-23 11:04:44 +00:00
Reflect code to test the magic bytes in the sjis.fnt header.
svn-id: r42821
This commit is contained in:
parent
84c0bf22d2
commit
4b27c43b0a
@ -28,6 +28,7 @@
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "common/archive.h"
|
||||
#include "common/endian.h"
|
||||
|
||||
namespace Graphics {
|
||||
|
||||
@ -232,6 +233,14 @@ bool FontSjisSVM::loadData() {
|
||||
Common::SeekableReadStream *data = SearchMan.createReadStreamForMember("SJIS.FNT");
|
||||
if (!data)
|
||||
return false;
|
||||
|
||||
uint32 magic1 = data->readUint32BE();
|
||||
uint32 magic2 = data->readUint32BE();
|
||||
|
||||
if (magic1 != MKID_BE('SCVM') || magic2 != MKID_BE('SJIS')) {
|
||||
delete data;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 version = data->readUint32BE();
|
||||
if (version != 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user