From 445d68395e6ae0a54af7bf33c47361c9ca5ba027 Mon Sep 17 00:00:00 2001 From: DeckerSU Date: Tue, 12 Mar 2019 19:25:13 +0300 Subject: [PATCH] [msvc] fix seed str -> uint64 conversion --- src/cc/rogue/rogue.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/cc/rogue/rogue.c b/src/cc/rogue/rogue.c index 36616b340..7a8e38c15 100644 --- a/src/cc/rogue/rogue.c +++ b/src/cc/rogue/rogue.c @@ -343,7 +343,15 @@ int rogue(int argc, char **argv, char **envp) rs->sleeptime = 1; // non-zero to allow refresh() if ( argc == 3 && strlen(argv[2]) == 64 ) { - rs->seed = atol(argv[1]); + #ifdef _WIN32 + #ifdef _MSC_VER + rs->seed = _strtoui64(argv[1], NULL, 10); + #else + rs->seed = atol(argv[1]); // windows, but not MSVC + #endif // _MSC_VER + #else + rs->seed = atol(argv[1]); // non-windows + #endif // _WIN32 strcpy(Gametxidstr,argv[2]); fprintf(stderr,"setplayerdata\n"); if ( rogue_setplayerdata(rs,Gametxidstr) < 0 )