Skip to content

Commit

Permalink
Update response.h
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescraft10 authored Mar 15, 2024
1 parent f785e1e commit a98ac9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/response.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
Expand All @@ -118,4 +118,4 @@ class response {
+ this->file_code;
return;
}
};
};

0 comments on commit a98ac9d

Please sign in to comment.