*
* (c) 2005--2007 Martin Mares <mj@ucw.cz>
* (c) 2005 Tomas Valla <tom@ucw.cz>
- * (c) 2008--2019 Pavel Charvat <pchar@ucw.cz>
+ * (c) 2008--2020 Pavel Charvat <pchar@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
else if (x < (u64)10<<30)
sprintf(buf, "%.1fG", (double)x/(1<<30));
else if (x < (u64)1<<40)
- sprintf(buf, "%dG", (int)x/(1<<30));
+ sprintf(buf, "%dG", (int)(x/(1<<30)));
else if (x < (u64)10<<40)
sprintf(buf, "%.1fT", (double)x/((u64)1<<40));
else if (x != ~(u64)0)