diff options
author | Arnavion <arnavion@gmail.com> | 2014-12-06 14:02:45 -0800 |
---|---|---|
committer | Arnavion <arnavion@gmail.com> | 2014-12-06 14:02:45 -0800 |
commit | 5152040c17eef73134b5417d3f8ae53d7bc9f06d (patch) | |
tree | 589d12838b101de1c5988464198681f0ee13f536 /src/common/plugin.c | |
parent | 985ea610e62cdc1d553e4c5e194822bed1d5118f (diff) |
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
Diffstat (limited to 'src/common/plugin.c')
-rw-r--r-- | src/common/plugin.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/common/plugin.c b/src/common/plugin.c index d83b69ff..f386346e 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -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 */ |