Skip to content

Commit

Permalink
Terminate file name with 0
Browse files Browse the repository at this point in the history
  • Loading branch information
dujeonglee committed May 26, 2017
1 parent fbcbc61 commit 66c3986
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ int main(int argc, char *argv[])
NetworkCoding::NCSocket socket(htons(local_port), 500, 500, [&p_File, &rxsize](unsigned char* buffer, unsigned int length, const sockaddr_in * const sender_addr, const u32 sender_addr_len){
if(p_File == nullptr)
{
buffer[length] = '\n';
buffer[length] = 0;
p_File = fopen((char*)buffer, "w");
}
else if(length == 1 && buffer[0] == 0xff)
Expand Down

0 comments on commit 66c3986

Please sign in to comment.