No, it isn't, allow ROP compatible nops, which make_nops doesn't allow. But this function should use make_nops when rop is false. The problem is with the semantics, when asking for 1 nop with rop == false, indeed he is trying to do make_nops(4).