From b14648e28c332b97ca67d8d5107201667993b6fa Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 21 Aug 2022 13:26:57 -0500 Subject: [PATCH] fix: use ifstream instead of freopen --- main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index be3914c..6f07b9f 100644 --- a/main.cpp +++ b/main.cpp @@ -60,10 +60,10 @@ uint64_t find_patch_address(const std::vector &search_buffer) { } int main() { - freopen("modlimitfix.conf", "r", stdin); + ifstream ifs("modlimitfix.conf"); uint32_t mod_limit; bool using_conf = false; - cin >> mod_limit; + ifs >> mod_limit; if (mod_limit) { patched_limit = mod_limit; using_conf = true;