diff options
author | Eion Robb <eion@robbmob.com> | 2019-09-12 07:01:23 +0300 |
---|---|---|
committer | Eion Robb <eion@robbmob.com> | 2019-09-12 07:01:23 +0300 |
commit | 1b46ab21b6645285e35d59b263e4714f3571919e (patch) | |
tree | 3bef5501371a5ceb112d9e7a251443918b9c07bf | |
parent | d4baa8fc1ad6832a2118facfb15f3d6bcec25a41 (diff) |
Fix compiler warning about possible overflow
-rw-r--r-- | steam-mobile/libsteam.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/steam-mobile/libsteam.c b/steam-mobile/libsteam.c index 9daceab..62e2380 100644 --- a/steam-mobile/libsteam.c +++ b/steam-mobile/libsteam.c @@ -229,7 +229,7 @@ steam_personastate_to_statustype(gint64 state) static const gchar *
steam_accountid_to_steamid(gint64 accountid)
{
- static gchar steamid[20];
+ static gchar steamid[21];
sprintf(steamid, "%" G_GINT64_FORMAT, accountid + G_GINT64_CONSTANT(76561197960265728));
@@ -239,7 +239,7 @@ steam_accountid_to_steamid(gint64 accountid) static const gchar *
steam_steamid_to_accountid(const gchar *steamid)
{
- static gchar accountid[10];
+ static gchar accountid[21];
gint64 steamid_int = g_ascii_strtoll(steamid, NULL, 10);
g_return_val_if_fail(steamid_int, NULL);
|