diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/fcblanks.c | 7 | ||||
-rw-r--r-- | src/fccfg.c | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/fcblanks.c b/src/fcblanks.c index 46698bcd..49f520be 100644 --- a/src/fcblanks.c +++ b/src/fcblanks.c @@ -41,6 +41,8 @@ FcBlanksCreate (void) void FcBlanksDestroy (FcBlanks *b) { + if (b->sblank == -1) + return; if (b->blanks) free (b->blanks); free (b); @@ -56,6 +58,11 @@ FcBlanksAdd (FcBlanks *b, FcChar32 ucs4) if (b->blanks[sblank] == ucs4) return FcTrue; + if (b->sblank == -1) + { + fprintf (stderr, "Unable to update the static FcBlanks: 0x%04x\n", ucs4); + return FcTrue; + } if (b->nblank == b->sblank) { sblank = b->sblank + 32; diff --git a/src/fccfg.c b/src/fccfg.c index b27ab0b4..e2f7ea8d 100644 --- a/src/fccfg.c +++ b/src/fccfg.c @@ -27,6 +27,7 @@ #include "fcint.h" #include <dirent.h> #include <sys/types.h> +#include "../fc-blanks/fcblanks.h" #if defined (_WIN32) && !defined (R_OK) #define R_OK 4 @@ -109,7 +110,7 @@ FcConfigCreate (void) if (!config->cacheDirs) goto bail8; - config->blanks = 0; + config->blanks = &fcBlanks; config->substPattern = 0; config->substFont = 0; |