File: debian-changes-1.2.4-2

package info (click to toggle)
hunspell 1.7.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,952 kB
  • sloc: cpp: 16,817; sh: 1,138; makefile: 712; perl: 522; ansic: 67; sed: 16
file content (37 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- hunspell-1.2.6.orig/src/hunspell/affixmgr.cxx
+++ hunspell-1.2.6/src/hunspell/affixmgr.cxx
@@ -148,11 +148,11 @@
        sStart[j] = NULL;
   }
 
-  if (keystring) free(keystring);
+  if (keystring && keystring != SPELL_KEYSTRING) free(keystring);
   keystring=NULL;
   if (trystring) free(trystring);
   trystring=NULL;
-  if (encoding) free(encoding);
+  if (encoding && encoding != SPELL_ENCODING) free(encoding);
   encoding=NULL;
   if (maptable) {  
      for (int j=0; j < nummap; j++) {
@@ -2971,7 +2971,9 @@
 // return text encoding of dictionary
 char * AffixMgr::get_encoding()
 {
-  if (! encoding ) encoding = mystrdup(SPELL_ENCODING);
+  if (! encoding ) {
+      encoding = SPELL_ENCODING;
+  }
   return mystrdup(encoding);
 }
 
@@ -3020,7 +3022,7 @@
 // return the keyboard string for suggestions
 char * AffixMgr::get_key_string()
 {
-  if (! keystring ) keystring = mystrdup(SPELL_KEYSTRING);
+  if (! keystring ) keystring = SPELL_KEYSTRING;
   return mystrdup(keystring);
 }