Kaynağa Gözat

modules_k/sqlops: small bug fix to sqlops_get_value

pd 14 yıl önce
ebeveyn
işleme
b1a8bfd69c
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      modules_k/sqlops/sql_api.c

+ 1 - 1
modules_k/sqlops/sql_api.c

@@ -710,7 +710,7 @@ int sqlops_get_value(str *sres, int i, int j, sql_val_t **val)
 		LM_ERR("row index out of bounds [%d/%d]\n", i, res->nrows);
 		LM_ERR("row index out of bounds [%d/%d]\n", i, res->nrows);
 		goto error;
 		goto error;
 	}
 	}
-	if(i>=res->ncols)
+	if(j>=res->ncols)
 	{
 	{
 		LM_ERR("column index out of bounds [%d/%d]\n", j, res->ncols);
 		LM_ERR("column index out of bounds [%d/%d]\n", j, res->ncols);
 		goto error;
 		goto error;