diff --git a/common/util/FileUtil.cpp b/common/util/FileUtil.cpp index 88bd4142eb..1ad686450a 100644 --- a/common/util/FileUtil.cpp +++ b/common/util/FileUtil.cpp @@ -16,10 +16,8 @@ std::string file_util::get_project_path() { #ifdef _WIN32 char buffer[FILENAME_MAX]; GetModuleFileNameA(NULL, buffer, FILENAME_MAX); - printf("using path %s\n", buffer); std::string::size_type pos = std::string(buffer).rfind("jak-project"); // Strip file path down to \jak-project\ directory - printf("rfind returned %lld\n", pos); return std::string(buffer).substr( 0, pos + 11); // + 12 to include "\jak-project" in the returned filepath #else diff --git a/game/system/Deci2Server.cpp b/game/system/Deci2Server.cpp index ca52c173e6..f3e2f09b61 100644 --- a/game/system/Deci2Server.cpp +++ b/game/system/Deci2Server.cpp @@ -242,7 +242,7 @@ void Deci2Server::run() { return; } got += x > 0 ? x : 0; - hdr->rsvd += got; + hdr->rsvd = got; } } diff --git a/goalc/listener/Listener.cpp b/goalc/listener/Listener.cpp index 3a606d1249..e24393fc90 100644 --- a/goalc/listener/Listener.cpp +++ b/goalc/listener/Listener.cpp @@ -341,7 +341,7 @@ void Listener::send_buffer(int sz) { int wrote = 0; if (debug_listener) { - printf("[L -> T] sending %d bytes...\n", sz); + fprintf(stderr, "[L -> T] sending %d bytes...\n", sz); } got_ack = false; @@ -349,7 +349,7 @@ void Listener::send_buffer(int sz) { while (wrote < sz) { auto to_send = std::min(512, sz - wrote); auto x = write_to_socket(listen_socket, m_buffer + wrote, to_send); - wrote += x; + wrote += x > 0 ? x : 0; } if (debug_listener) {