Always use 64-bit filesize and file offsets in DCC.

Based on LRN's commit for replacing stat with GFileInfo https://github.com/hexchat/hexchat/commit/32008bb

Fixes #382
This commit is contained in:
Arnavion
2014-12-06 14:02:45 -08:00
parent 985ea610e6
commit 5152040c17
4 changed files with 331 additions and 192 deletions

View File

@@ -1531,7 +1531,14 @@ hexchat_list_int (hexchat_plugin *ph, hexchat_list *xlist, const char *name)
case 0x34207553: /* address32 */
return ((struct DCC *)data)->addr;
case 0x181a6: /* cps */
return ((struct DCC *)data)->cps;
{
gint64 cps = ((struct DCC *)data)->cps;
if (cps <= INT_MAX)
{
return (int) cps;
}
return INT_MAX;
}
case 0x349881: /* port */
return ((struct DCC *)data)->port;
case 0x1b254: /* pos */