substitute ffs()

windows libraries seem to lack this nice function
This commit is contained in:
ac-stef
2014-05-16 18:38:51 +02:00
parent 40f98595a8
commit af92c3cf22
+1 -1
View File
@@ -668,7 +668,7 @@ void edittype(int type)
loopv(sels)
{
block &sel = sels[i];
if(type == CORNER && (sel.xs != sel.ys || sel.xs != (1 << (ffs(sel.xs) - 1)) || (sel.x | sel.y) & (sel.xs - 1)))
if(type == CORNER && (sel.xs != sel.ys || (sel.xs != 1 && sel.xs != 2 && sel.xs != 4 && sel.xs != 8 && sel.xs != 16) || (sel.x | sel.y) & (sel.xs - 1)))
conoutf("corner selection must be power of 2 aligned");
else
{