[Groonga-commit] groonga/groonga at f7dcb13 [master] Fix a bug that MOD (%) operations perform SLASH (/) operations

Back to archive index

susumu.yata null+****@clear*****
Fri Feb 7 19:26:15 JST 2014


susumu.yata	2014-02-07 19:26:15 +0900 (Fri, 07 Feb 2014)

  New Revision: f7dcb13d283145772f52804dd51ec6f788959ab9
  https://github.com/groonga/groonga/commit/f7dcb13d283145772f52804dd51ec6f788959ab9

  Message:
    Fix a bug that MOD (%) operations perform SLASH (/) operations
    
    Redmine: refs #2307

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+1 -1)
===================================================================
--- lib/expr.c    2014-02-07 18:37:48 +0900 (f331958)
+++ lib/expr.c    2014-02-07 19:26:15 +0900 (28c4b74)
@@ -2237,7 +2237,7 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
   ((y == -1) ? -(x) : (x) / (y))
 #define UNSIGNED_INTEGER_DIVISION_OPERATION_SLASH(x, y) ((x) / (y))
 #define FLOAT_DIVISION_OPERATION_SLASH(x, y) ((double)(x) / (double)(y))
-#define SIGNED_INTEGER_DIVISION_OPERATION_MOD(x, y) ((y == -1) ? 0 : (x) / (y))
+#define SIGNED_INTEGER_DIVISION_OPERATION_MOD(x, y) ((y == -1) ? 0 : (x) % (y))
 #define UNSIGNED_INTEGER_DIVISION_OPERATION_MOD(x, y) ((x) % (y))
 #define FLOAT_DIVISION_OPERATION_MOD(x, y) (fmod((x), (y)))
 
-------------- next part --------------
HTML����������������������������...
Download 



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