[Groonga-commit] groonga/groonga at 34431c1 [master] token_filters/stem: cast the argument of toupper and tolower

Back to archive index

Susumu Yata null+****@clear*****
Wed Jul 19 13:54:40 JST 2017


Susumu Yata	2017-07-19 13:54:40 +0900 (Wed, 19 Jul 2017)

  New Revision: 34431c1f9e41be93ad35f8c79c2c8509652626b2
  https://github.com/groonga/groonga/commit/34431c1f9e41be93ad35f8c79c2c8509652626b2

  Message:
    token_filters/stem: cast the argument of toupper and tolower
    
    GitHub: #742

  Modified files:
    plugins/token_filters/stem.c

  Modified: plugins/token_filters/stem.c (+2 -2)
===================================================================
--- plugins/token_filters/stem.c    2017-07-18 16:17:15 +0900 (0b6720c)
+++ plugins/token_filters/stem.c    2017-07-19 13:54:40 +0900 (e918ed8)
@@ -135,7 +135,7 @@ normalize(grn_ctx *ctx,
       if (current > unwritten) {
         GRN_TEXT_PUT(ctx, normalized, unwritten, current - unwritten);
       }
-      GRN_TEXT_PUTC(ctx, normalized, tolower(*current));
+      GRN_TEXT_PUTC(ctx, normalized, tolower((unsigned char)*current));
       unwritten = current + 1;
     }
   }
@@ -161,7 +161,7 @@ unnormalize(grn_ctx *ctx,
       if (current > unwritten) {
         GRN_TEXT_PUT(ctx, normalized, unwritten, current - unwritten);
       }
-      GRN_TEXT_PUTC(ctx, normalized, toupper(*current));
+      GRN_TEXT_PUTC(ctx, normalized, toupper((unsigned char)*current));
       unwritten = current + 1;
     }
   }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index