From 2a7854ebacad6c6b7a19342729fb314ace647210 Mon Sep 17 00:00:00 2001 From: Nikola Petrov Date: Mon, 14 Aug 2023 14:15:12 +0200 Subject: [PATCH] define MAX_STRING SIZE --- Password_manager/include/func.h | 5 +++-- Password_manager/source/func.cpp | 5 ++--- Password_manager/source/main.cpp | 14 +++++++------- Password_manager/source/win.cpp | 3 ++- 4 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Password_manager/include/func.h b/Password_manager/include/func.h index 3cf863f..7b98705 100644 --- a/Password_manager/include/func.h +++ b/Password_manager/include/func.h @@ -2,11 +2,12 @@ #include #include "buffer.h" +constexpr auto MAX_STRING_SIZE = 21; struct Pass { - char label[21]; - char password[21]; + char label[MAX_STRING_SIZE]; + char password[MAX_STRING_SIZE]; Pass() = default; }; diff --git a/Password_manager/source/func.cpp b/Password_manager/source/func.cpp index 9bfdb47..b226bcd 100644 --- a/Password_manager/source/func.cpp +++ b/Password_manager/source/func.cpp @@ -63,13 +63,13 @@ void print_usage() { printf_s(" Usage:\n\n"); printf_s(" password_manager.exe [flags]\n\n"); - printf_s(" Note: