🐛 fix bug in recvfrom

This commit is contained in:
ValKmjolnir
2023-11-06 00:22:11 +08:00
parent 1d95d5ab3d
commit b41f7f119f
4 changed files with 70 additions and 1 deletions

View File

@@ -231,6 +231,7 @@ var nas_recvfrom(var* args, usize size, gc* ngc) {
hash["str"] = ngc->newstr(buf);
delete[] buf;
hash["fromip"] = ngc->newstr(inet_ntoa(addr.sin_addr));
hash["port"] = var::num(ntohs(addr.sin_port));
ngc->temp = nil;
return res;
}