commit 1da03cb552d134f8da4a6ee5d2c9de90ec741376
parent 394a246b773e9d3aea863084c6d0995eaffec787
Author: cfillion <cfillion@users.noreply.github.com>
Date: Sat, 2 Apr 2016 14:54:01 -0400
show the self-registration error message above REAPER's splash screen
Diffstat:
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/reapack.cpp b/src/reapack.cpp
@@ -546,10 +546,13 @@ void ReaPack::registerSelf()
reg.commit();
}
catch(const reapack_error &e) {
- char msg[4096] = {};
- sprintf(msg,
- "ReaPack could not register itself! Please report this issue.\n\n"
- "Error description: %s", e.what());
- ShowMessageBox(msg, "ReaPack", MB_OK);
+ const auto_string &desc = make_autostring(e.what());
+
+ auto_char msg[255] = {};
+ auto_snprintf(msg, sizeof(msg),
+ AUTO_STR("ReaPack could not register itself! Please report this issue.\n\n")
+ AUTO_STR("Error description: %s"), desc.c_str());
+
+ MessageBox(Splash_GetWnd(), msg, AUTO_STR("ReaPack"), MB_OK);
}
}