From 9fcdb5816d293525fe6e4b333e8b6d73e74574db Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Mon, 21 Sep 2026 19:11:57 +0000 Subject: [PATCH] Match CheckSafeDeleteTitle --- src/utility/iplESMisc.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/utility/iplESMisc.cpp b/src/utility/iplESMisc.cpp index 1b4579f5..1a62f716 100644 --- a/src/utility/iplESMisc.cpp +++ b/src/utility/iplESMisc.cpp @@ -586,13 +586,12 @@ namespace ipl { } else if (result > 0) { result = 0; } else { - ESError err = ES_GetTmdView(titleId, NULL, &tmdViewSize); - result = err; + result = ES_GetTmdView(titleId, NULL, &tmdViewSize); - if (err == ES_ERR_DONT_EXISTS) { + if (result == ES_ERR_DONT_EXISTS) { result = ES_ERR_OK; - } else if (err != ES_ERR_OK) { - ES_ERR_REPORT("ES_GetTmdView1 failed: %d", err); + } else if (result != ES_ERR_OK) { + ES_ERR_REPORT("ES_GetTmdView1 failed: %d", result); } else { tmdView = (ESTmdView*)heap->alloc(OSRoundUp32B(tmdViewSize), -DEFAULT_ALIGN); result = ES_GetTmdView(titleId, tmdView, &tmdViewSize); @@ -607,7 +606,7 @@ namespace ipl { if (result < 0) { ES_ERR_REPORT("NumInodesSaveDirRoot failed: %d", result); } else { - result = (result == 0); + result = __rlwnm(1, __cntlzw(result), 31, 31); } } } -- 2.49.1