Originally Posted By: 3run
Originally Posted By: Dico
the problem is not in file_str_read but in printf
Use any other draw function f.e. debug_var or draw_text, and you'll see that bug is still there wink


try this

Code:
#include <acknex.h>

STRING* str_show = "";
TEXT* txt_d =
{
	string = str_show;
	pos_y = 200;
	flags = SHOW;
}

void main()
{
	var h = file_open_read("test.txt");
	if (h)
	{
		STRING* s = str_create("#128");
		file_str_read(h,s);
		//printf("The content is:\n%s\nThe length is:\n%d",s->chars,(int)str_len(s));
		str_cpy(str_show,s);
		
		file_close(h);
	}
}


there is no crash