fix edged rect loader buffer overflow. fixes #2751