From cb9958a06b760e5f1548cf734c2e507810529b7c Mon Sep 17 00:00:00 2001 From: septs Date: Fri, 3 May 2024 17:00:39 +0800 Subject: [PATCH] chore: resolve mingw build failed --- src/applet/profile/download.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/applet/profile/download.c b/src/applet/profile/download.c index 8609617..6fe78ef 100644 --- a/src/applet/profile/download.c +++ b/src/applet/profile/download.c @@ -65,10 +65,11 @@ static int applet_main(int argc, char **argv) // Section: 4.1 (Activation Code) char *activation = argv[1] + 4; - char *token = strsep(&activation, "$"); + char *offset = NULL; + char *token = NULL; int index = 0; - while (token != NULL) + while ((token = strtok_r(activation, "$", &offset)) != NULL) { switch (index) { @@ -99,7 +100,6 @@ static int applet_main(int argc, char **argv) break; } index++; - token = strsep(&activation, "$"); } }