Files
haikuports/app-text/hunspell/patches/hunspell-1.3.3.patchset
2014-08-21 21:02:42 +00:00

31 lines
952 B
Plaintext

From 0aa0f31df70d513ee575c8fbe852fff331d234f9 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 21 Aug 2014 17:41:26 +0000
Subject: haiku gcc2
diff --git a/src/hunspell/hashmgr.cxx b/src/hunspell/hashmgr.cxx
index 12adf42..0f04910 100644
--- a/src/hunspell/hashmgr.cxx
+++ b/src/hunspell/hashmgr.cxx
@@ -5,7 +5,6 @@
#include <string.h>
#include <stdio.h>
#include <ctype.h>
-#include <limits>
#include "hashmgr.hxx"
#include "csutil.hxx"
@@ -386,7 +385,7 @@ int HashMgr::load_tables(const char * tpath, const char * key)
int nExtra = 5 + USERWORD;
- if (tablesize <= 0 || (tablesize >= (std::numeric_limits<int>::max() - 1 - nExtra) / int(sizeof(struct hentry *)))) {
+ if (tablesize <= 0 || (tablesize >= (INT_MAX - 1 - nExtra) / int(sizeof(struct hentry *)))) {
HUNSPELL_WARNING(stderr, "error: line 1: missing or bad word count in the dic file\n");
delete dict;
return 4;
--
1.8.3.4