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:
ragnarok-clanker 2026-10-28 19:44:47 +00:00
commit 96c3974f4c
3 changed files with 21 additions and 0 deletions

View 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] = '_';
}
}
}

View 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