Skip to content

Commit 66c3986

Browse files
committed
Terminate file name with 0
1 parent fbcbc61 commit 66c3986

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int main(int argc, char *argv[])
2020
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){
2121
if(p_File == nullptr)
2222
{
23-
buffer[length] = '\n';
23+
buffer[length] = 0;
2424
p_File = fopen((char*)buffer, "w");
2525
}
2626
else if(length == 1 && buffer[0] == 0xff)

0 commit comments

Comments
 (0)