Properly handle EOF when parsing text resource
Properly handle EOF when parsing text resource

Fixes #36652

BastiaanOlij/godot,ZuBsPaCe/godot,sanikoyes/godot,honix/godot,vkbsb/godot,ZuBsPaCe/godot,BastiaanOlij/godot,Valentactive/godot,BastiaanOlij/godot,MarianoGnu/godot,josempans/godot,josempans/godot,sanikoyes/godot,honix/godot,sanikoyes/godot,vnen/godot,Faless/godot,BastiaanOlij/godot,BastiaanOlij/godot,Valentactive/godot,MarianoGnu/godot,akien-mga/godot,DmitriySalnikov/godot,MarianoGnu/godot,vnen/godot,Paulloz/godot,MarianoGnu/godot,Paulloz/godot,firefly2442/godot,Shockblast/godot,BastiaanOlij/godot,josempans/godot,MarianoGnu/godot,guilhermefelipecgs/godot,vnen/godot,pkowal1982/godot,Faless/godot,firefly2442/godot,Zylann/godot,honix/godot,Shockblast/godot,guilhermefelipecgs/godot,Valentactive/godot,josempans/godot,vkbsb/godot,akien-mga/godot,Faless/godot,Paulloz/godot,honix/godot,Zylann/godot,akien-mga/godot,Paulloz/godot,BastiaanOlij/godot,firefly2442/godot,Paulloz/godot,vkbsb/godot,pkowal1982/godot,vkbsb/godot,godotengine/godot,ZuBsPaCe/godot,josempans/godot,godotengine/godot,sanikoyes/godot,pkowal1982/godot,pkowal1982/godot,godotengine/godot,guilhermefelipecgs/godot,vnen/godot,akien-mga/godot,honix/godot,ZuBsPaCe/godot,vnen/godot,sanikoyes/godot,Shockblast/godot,Faless/godot,MarianoGnu/godot,josempans/godot,akien-mga/godot,DmitriySalnikov/godot,josempans/godot,sanikoyes/godot,Zylann/godot,Valentactive/godot,ZuBsPaCe/godot,Valentactive/godot,vkbsb/godot,Zylann/godot,vkbsb/godot,Faless/godot,godotengine/godot,Zylann/godot,DmitriySalnikov/godot,guilhermefelipecgs/godot,pkowal1982/godot,honix/godot,pkowal1982/godot,Valentactive/godot,ZuBsPaCe/godot,Faless/godot,firefly2442/godot,Zylann/godot,Valentactive/godot,firefly2442/godot,Shockblast/godot,Shockblast/godot,godotengine/godot,BastiaanOlij/godot,guilhermefelipecgs/godot,pkowal1982/godot,MarianoGnu/godot,vnen/godot,Shockblast/godot,godotengine/godot,Faless/godot,guilhermefelipecgs/godot,godotengine/godot,Shockblast/godot,vnen/godot,sanikoyes/godot,guilhermefelipecgs/godot,firefly2442/godot,Shockblast/godot,vkbsb/godot,Zylann/godot,pkowal1982/godot,DmitriySalnikov/godot,DmitriySalnikov/godot,DmitriySalnikov/godot,guilhermefelipecgs/godot,vnen/godot,ZuBsPaCe/godot,godotengine/godot,Zylann/godot,Faless/godot,akien-mga/godot,DmitriySalnikov/godot,Paulloz/godot,sanikoyes/godot,ZuBsPaCe/godot,vkbsb/godot,josempans/godot,firefly2442/godot,akien-mga/godot,Valentactive/godot,firefly2442/godot,Paulloz/godot,akien-mga/godot,MarianoGnu/godot