crayon
crayon copied to clipboard
javascript export crashes when 2D text is drawn with empty string
import Game;
import Graphics2D;
import Graphics2DText;
function main() {
window = new GameWindow("λ++", 40, 500, 500);
fontresource = FontResource.fromSystem("Courier New");
renderer = new FontRenderer(fontresource);
while(true) {
Draw.line(5, 5, 30, 30, 2, 240, 100, 240);
texture = renderer.render("This will always be printed.");
texture.draw(20, 20);
texture = renderer.render("");
texture.draw(20, 40);
texture = renderer.render("This isn't reached in javascript (but it is in cbx)");
texture.draw(20, 60);
window.clockTick();
}