crayon icon indicating copy to clipboard operation
crayon copied to clipboard

javascript export crashes when 2D text is drawn with empty string

Open TimJSwan89 opened this issue 5 years ago • 0 comments

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();
    }

TimJSwan89 avatar Oct 17 '19 23:10 TimJSwan89