From a98ac9d9874797cf48dbcdbd5f636b6429a6fa30 Mon Sep 17 00:00:00 2001 From: JamesCraft10 <69867626+jamescraft10@users.noreply.github.com> Date: Fri, 15 Mar 2024 14:46:04 -0400 Subject: [PATCH] Update response.h --- src/response.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/response.h b/src/response.h index c07f188..48ee9d4 100644 --- a/src/response.h +++ b/src/response.h @@ -9,7 +9,7 @@ std::string read_file_public(std::string path1) { std::ifstream File(path); if(File.is_open()) { while(getline(File, line)) { - text += line+"\n"; + text += line; } File.close(); } else { @@ -95,7 +95,7 @@ class response { std::string data = path; data.erase(0,14); std::string file_data = read_file("./data/chat.data"); - char state = file_data[file_data.length()-2]; + char state = file_data[file_data.length()-1]; std::cout << state << "\n"; if(state == '0') { state = '1'; } else { state = '0'; } data += state; @@ -118,4 +118,4 @@ class response { + this->file_code; return; } -}; \ No newline at end of file +};