Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
beetle-saturn-libretro
Commits
6c074417
Commit
6c074417
authored
Aug 12, 2016
by
Libretro-Admin
Browse files
Get past crash in CalcGameID
parent
3a5f2f8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
libretro.cpp
View file @
6c074417
...
...
@@ -910,7 +910,7 @@ static bool IsSaturnDisc(const uint8* sa32k)
static
void
CalcGameID
(
uint8
*
id_out16
,
uint8
*
fd_id_out16
,
char
*
sgid
)
{
md5_context
mctx
;
uint8_t
*
buf
=
new
uint8_t
[
2048
];
uint8_t
buf
[
2048
];
log_cb
(
RETRO_LOG_INFO
,
"Start calculating game ID, discs: %d...
\n
"
,
cdifs
?
cdifs
->
size
()
:
0
);
...
...
@@ -944,7 +944,7 @@ static void CalcGameID(uint8* id_out16, uint8* fd_id_out16, char* sgid)
if
(
i
==
0
)
{
char
*
tmp
;
memcpy
(
sgid
,
(
void
*
)(
buf
[
0x20
]),
16
);
memcpy
(
sgid
,
(
void
*
)(
&
buf
[
0x20
]),
16
);
sgid
[
16
]
=
0
;
if
((
tmp
=
strrchr
(
sgid
,
'V'
)))
{
...
...
@@ -966,9 +966,6 @@ static void CalcGameID(uint8* id_out16, uint8* fd_id_out16, char* sgid)
}
}
if
(
buf
)
free
(
buf
);
mctx
.
finish
(
id_out16
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment