1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix reading Unicode from stdio.

This commit is contained in:
bruvzg
2022-12-21 08:38:14 +02:00
parent 2a04b18d37
commit 3d8a942a56
3 changed files with 7 additions and 8 deletions

View File

@@ -152,12 +152,10 @@ Vector<String> OS_Unix::get_video_adapter_driver_info() const {
String OS_Unix::get_stdin_string(bool p_block) {
if (p_block) {
char buff[1024];
String ret = stdin_buf + fgets(buff, 1024, stdin);
stdin_buf = "";
return ret;
return String::utf8(fgets(buff, 1024, stdin));
}
return "";
return String();
}
Error OS_Unix::get_entropy(uint8_t *r_buffer, int p_bytes) {