Skip to content
Snippets Groups Projects
Commit ab36cc8b authored by Vytor Calixto's avatar Vytor Calixto :space_invader:
Browse files

Fixed bad_alloc on server

parent 6f3b7f0f
No related branches found
No related tags found
1 merge request!1Lento
...@@ -64,7 +64,7 @@ int Protocol::setData(vector<BYTE> data, int type){ ...@@ -64,7 +64,7 @@ int Protocol::setData(vector<BYTE> data, int type){
msg.type = bitset<TYPE_S>(type); msg.type = bitset<TYPE_S>(type);
int size = ((int)data.size())-i; int size = ((int)data.size())-i;
first = data.begin()+i; first = data.begin()+i;
last = data.begin()+size+1; last = data.begin()+i+size+1;
vector<BYTE> subvector(first, last); vector<BYTE> subvector(first, last);
msg.data = subvector; msg.data = subvector;
if(size < MINSIZE){ if(size < MINSIZE){
......
...@@ -26,6 +26,5 @@ string ls(string args){ ...@@ -26,6 +26,5 @@ string ls(string args){
output += buffer; output += buffer;
} }
pclose(lsOut); pclose(lsOut);
cout << "output: "<< output<<endl;
return output; return output;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment