mirror of
https://github.com/ValKmjolnir/Nasal-Interpreter.git
synced 2026-05-24 13:35:43 +08:00
🐛 fix bug in recvfrom
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user