Protect against call from C

This commit is contained in:
Fabian 2017-07-26 11:51:49 +02:00
parent 7c9cdc75d3
commit d6f856207c

View file

@ -161,6 +161,7 @@ SyncBuffer.prototype.get_buffer = function(fn)
*/
v86util.int_log2 = function(x)
{
x >>>= 0;
dbg_assert(x > 0);
// http://jsperf.com/integer-log2/6