diff --git a/game/kernel/jak1/kmachine.cpp b/game/kernel/jak1/kmachine.cpp index c7730491d9b..dfac2eec4bf 100644 --- a/game/kernel/jak1/kmachine.cpp +++ b/game/kernel/jak1/kmachine.cpp @@ -391,14 +391,12 @@ u64 kopen(u64 fs, u64 name, u64 mode) { file_stream->name = name; file_stream->flags = 0; lg::print("****** CALL TO kopen() ******\n"); - char buffer[128]; // sprintf(buffer, "host:%s", Ptr(name)->data()); - sprintf(buffer, "%s", Ptr(name)->data()); if (!strcmp(info(Ptr(mode))->str->data(), "read")) { - file_stream->file = sceOpen(buffer, SCE_RDONLY); + file_stream->file = sceOpen(Ptr(name)->data(), SCE_RDONLY); } else { // 0x602 - file_stream->file = sceOpen(buffer, SCE_TRUNC | SCE_CREAT | SCE_WRONLY); + file_stream->file = sceOpen(Ptr(name)->data(), SCE_TRUNC | SCE_CREAT | SCE_WRONLY); } return fs; diff --git a/game/kernel/jak2/kmachine.cpp b/game/kernel/jak2/kmachine.cpp index 6ad8fc76727..397eb1ba33a 100644 --- a/game/kernel/jak2/kmachine.cpp +++ b/game/kernel/jak2/kmachine.cpp @@ -505,19 +505,17 @@ u64 kopen(u64 fs, u64 name, u64 mode) { file_stream->name = name; file_stream->flags = 0; lg::print("****** CALL TO kopen() ******\n"); - char buffer[128]; // sprintf(buffer, "host:%s", Ptr(name)->data()); - sprintf(buffer, "%s", Ptr(name)->data()); if (!strcmp(symbol_name_cstr(*Ptr>(mode)), "read")) { // 0x1 - file_stream->file = sceOpen(buffer, SCE_RDONLY); + file_stream->file = sceOpen(Ptr(name)->data(), SCE_RDONLY); } else if (!strcmp(symbol_name_cstr(*Ptr>(mode)), "append")) { // new in jak 2! // 0x202 - file_stream->file = sceOpen(buffer, SCE_CREAT | SCE_WRONLY); + file_stream->file = sceOpen(Ptr(name)->data(), SCE_CREAT | SCE_WRONLY); } else { // 0x602 - file_stream->file = sceOpen(buffer, SCE_TRUNC | SCE_CREAT | SCE_WRONLY); + file_stream->file = sceOpen(Ptr(name)->data(), SCE_TRUNC | SCE_CREAT | SCE_WRONLY); } return fs; diff --git a/game/kernel/jak3/kmachine.cpp b/game/kernel/jak3/kmachine.cpp index 3c185bb0614..fc19d0e8e51 100644 --- a/game/kernel/jak3/kmachine.cpp +++ b/game/kernel/jak3/kmachine.cpp @@ -324,19 +324,17 @@ u64 kopen(u64 fs, u64 name, u64 mode) { file_stream->name = name; file_stream->flags = 0; lg::print("****** CALL TO kopen() ******\n"); - char buffer[128]; // sprintf(buffer, "host:%s", Ptr(name)->data()); - sprintf(buffer, "%s", Ptr(name)->data()); if (!strcmp(sym_to_cstring(Ptr>(mode)), "read")) { // 0x1 - file_stream->file = ee::sceOpen(buffer, SCE_RDONLY); + file_stream->file = ee::sceOpen(Ptr(name)->data(), SCE_RDONLY); } else if (!strcmp(sym_to_cstring(Ptr>(mode)), "append")) { // new in jak 2! // 0x202 - file_stream->file = ee::sceOpen(buffer, SCE_CREAT | SCE_WRONLY); + file_stream->file = ee::sceOpen(Ptr(name)->data(), SCE_CREAT | SCE_WRONLY); } else { // 0x602 - file_stream->file = ee::sceOpen(buffer, SCE_TRUNC | SCE_CREAT | SCE_WRONLY); + file_stream->file = ee::sceOpen(Ptr(name)->data(), SCE_TRUNC | SCE_CREAT | SCE_WRONLY); } return fs;