mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
replaced the unsafe tag2str implementation by a safe one, now that it seems to be meant for general use ;)
svn-id: r30599
This commit is contained in:
parent
86456702f9
commit
daf2bc9579
@ -640,12 +640,12 @@ char *scumm_strrev(char *str) {
|
||||
return str;
|
||||
}
|
||||
|
||||
const char *tag2str(uint32 tag) {
|
||||
static char str[5];
|
||||
Common::String tag2string(uint32 tag) {
|
||||
char str[5];
|
||||
str[0] = (char)(tag >> 24);
|
||||
str[1] = (char)(tag >> 16);
|
||||
str[2] = (char)(tag >> 8);
|
||||
str[3] = (char)tag;
|
||||
str[4] = '\0';
|
||||
return str;
|
||||
return Common::String(str);
|
||||
}
|
||||
|
@ -319,7 +319,8 @@ extern int gDebugLevel;
|
||||
|
||||
char *scumm_strrev(char *str);
|
||||
|
||||
const char *tag2str(uint32 tag);
|
||||
Common::String tag2string(uint32 tag);
|
||||
#define tag2str(x) tag2string(x).c_str()
|
||||
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user