Skip to content

Commit

Permalink
replace 'snprintf' with '_snprintf'
Browse files Browse the repository at this point in the history
The 'snprintf' function wasn't available until VC2015.
  • Loading branch information
Softkandi committed Sep 18, 2024
1 parent 1568243 commit ab6523e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -3246,7 +3246,7 @@ bool tig_net_client_is_lagging(int client_id)
// 0x52ACE0
bool sub_52ACE0(int client_id, char* dst, size_t size)
{
snprintf(dst, size, "%s", tig_net_client_is_waiting(client_id) ? "Waiting to join" : "Playing");
_snprintf(dst, size, "%s", tig_net_client_is_waiting(client_id) ? "Waiting to join" : "Playing");
return true;
}

Expand Down
4 changes: 2 additions & 2 deletions src/net_xfer.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void tig_net_xfer_recv_info_pkt(void* pkt)

FREE(directory_path);

snprintf(buffer, sizeof(buffer), "%s.%s", xfer->path, ".RECV");
_snprintf(buffer, sizeof(buffer), "%s.%s", xfer->path, ".RECV");

xfer->stream = tig_file_fopen(buffer, "wb");
xfer->flags = TIG_NET_XFER_ACTIVE | TIG_NET_XFER_RECEIVER;
Expand All @@ -239,7 +239,7 @@ void tig_net_xfer_recv_info_pkt(void* pkt)
xfer->path);
tig_file_fclose(xfer->stream);

snprintf(buffer, sizeof(buffer), xfer->path, ".RECV");
_snprintf(buffer, sizeof(buffer), xfer->path, ".RECV");
tig_file_rename(buffer, xfer->path);
FREE(xfer->path);
tig_net_xfer_reset(xfer);
Expand Down

0 comments on commit ab6523e

Please sign in to comment.