was casting to short for int args.

This commit is contained in:
Campbell Barton
2012-05-14 13:54:00 +00:00
parent a7a79322bf
commit ff26474a46
2 changed files with 4 additions and 3 deletions

View File

@@ -109,8 +109,9 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
&mcoords[i][0], &mcoords[i][1]);
UI_view2d_region_to_view(&ar->v2d,
(int)loc[0], (int)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
if (i>= 256) break;
}

View File

@@ -2647,7 +2647,7 @@ static int cut_links_exec(bContext *C, wmOperator *op)
float loc[2];
RNA_float_get_array(&itemptr, "loc", loc);
UI_view2d_region_to_view(&ar->v2d, (short)loc[0], (short)loc[1],
UI_view2d_region_to_view(&ar->v2d, (int)loc[0], (int)loc[1],
&mcoords[i][0], &mcoords[i][1]);
i++;
if (i>= 256) break;