SFML community forums

General => SFML wiki => Topic started by: etixpp on November 06, 2013, 11:26:49 pm

Title: Sourcecode not working/mistake -> Recource to sfml image
Post by: etixpp on November 06, 2013, 11:26:49 pm
https://github.com/SFML/SFML/wiki/Source%3A-Load-Image-From-Resource

if (!image.loadFromMemory(firstByte, rsrcDataSize))

should obviously be

if (!image->loadFromMemory(firstByte, rsrcDataSize))

Title: Re: Sourcecode not working/mistake -> Recource to sfml image
Post by: Nexus on November 07, 2013, 01:15:46 am
Since it's a community wiki, why don't you just correct it?

And the code has much bigger problems than typos, one of which is memory leaks (and less important: questionable exception types, non-local variable, useless initialization with NULL).

I'll fix everything.
Title: Re: Sourcecode not working/mistake -> Recource to sfml image
Post by: etixpp on November 07, 2013, 07:06:27 am
Oh i forgot i can change it myself D: