From 91d19a493c91a03e74e3f4c8b53210903f968f50 Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Tue, 9 Mar 2021 20:03:11 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20'du2/program.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit M5 F90 Top --- du2/program.c | 1 + 1 file changed, 1 insertion(+) diff --git a/du2/program.c b/du2/program.c index c61cb36..e0f1911 100644 --- a/du2/program.c +++ b/du2/program.c @@ -27,6 +27,7 @@ int main() { for (int i = 0; fgets(glass[i], 20, stdin); i++){ for (int j = 0; j < strlen(glass[i]); j++){ + glass[i][strlen(glass[i])-1] = '\0'; if (!isdigit(glass[i][j]) || atoi (glass[i]) < 1){ goto LABEL; }