Decompile fn_17830 (SanitizeScreenshotName)
Batch #1616 by eAthena: 0 byte-identical, 1 confirmed by peer review. - fn_17830 SanitizeScreenshotName: logic confirmed by peer review Reviewed-by: ragnarok-clanker Adds to the build: Source/Client/ModeScreenshot.cpp
This commit is contained in:
parent
856429f9dc
commit
96c3974f4c
3 changed files with 21 additions and 0 deletions
12
Source/Client/ModeScreenshot.cpp
Normal file
12
Source/Client/ModeScreenshot.cpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include "Client/ModeScreenshot.h"
|
||||
|
||||
// OFFSET: 0x00AD63F0
|
||||
// FUNCTION: fn_17830
|
||||
void SanitizeScreenshotName(std::string& name) {
|
||||
for (std::size_t i = 0; i < name.size(); ++i) {
|
||||
const char c = name[i];
|
||||
if (c == '\\' || c == '/' || c == ':' || c == '*' || c == '?' || c == '"' || c == '<' || c == '>' || c == '|') {
|
||||
name[i] = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
8
Source/Client/ModeScreenshot.h
Normal file
8
Source/Client/ModeScreenshot.h
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef RAGNAROK_SOURCE_CLIENT_MODESCREENSHOT_H
|
||||
#define RAGNAROK_SOURCE_CLIENT_MODESCREENSHOT_H
|
||||
|
||||
#include <string>
|
||||
|
||||
void SanitizeScreenshotName(std::string& name);
|
||||
|
||||
#endif
|
||||
|
|
@ -260,6 +260,7 @@
|
|||
"Source/Client/ModeBaseEvents.cpp": 0,
|
||||
"Source/Client/ModeFade.cpp": 0,
|
||||
"Source/Client/ModeFadeOut.cpp": 0,
|
||||
"Source/Client/ModeScreenshot.cpp": 0,
|
||||
"Source/Client/ModeTransitions.cpp": 0,
|
||||
"Source/Client/Registry.cpp": 0,
|
||||
"Source/Client/Replay.cpp": 0,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue