From 802018e16e339fd9aa06cea4d3d361ec0eba1020 Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Fri, 22 Apr 2022 18:53:26 +0200 Subject: [PATCH] added code for checking internet connection --- src/misc.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/misc.c b/src/misc.c index 3f2ea15..97962ad 100644 --- a/src/misc.c +++ b/src/misc.c @@ -39,6 +39,15 @@ checkVersion() strcat(buffer, lineBuffer); } + //CHECK FOR TEXT IN buffer + if (strcmp(buffer, "") == 0) + { + fprintf(stderr, "You probably aren't connected to internet! This release could be unsafe!\n"); + + //WAIT FOR 5 SECONDS + sleep(5); + } + //CLEANUP fclose(fileBuffer);