domeengine / dome

A lightweight game development environment where games can be written in Wren
https://www.domeengine.com
MIT License
473 stars 40 forks source link

embed may failed on windows wsl2 #265

Closed dotnfc closed 8 months ago

dotnfc commented 1 year ago

on windows wsl2, we may use TortoiseGit to clone dome repo with CrLf, so the generated .inc files may be incorrect for '\r' char. how about adding serveral lines to handle this in the embedlib.c:

27 if (ptr == '\n') { 28 fputs("'\n',", fp); 29 fputs("\n", fp); 30 } else if (ptr == '\r') { <<< 31 continue; <<< 32 } else { 33 fputs("'", fp);

avivbeeri commented 1 year ago

Just clarifying, you're suggesting adding lines 30 and 31 here?

dotnfc commented 1 year ago

yes, sure.