| Summary: | SDL_Rect | ||
|---|---|---|---|
| Product: | SDL_image | Reporter: | dobre.dani.alias |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 2.0.1 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
| Attachments: | Shows the values of sdlRect1 at different execution times. | ||
I should have used 'new SDL_Rect'! |
Created attachment 2651 [details] Shows the values of sdlRect1 at different execution times. Two SDL_Rect pointers are declared, the first one is initialised, then the second one. When the second SDL_Rect struct is initialised, the first one has its values overwritten with gibberish. SDL_Rect *sdlRect1; sdlRect1->x = 10; sdlRect1->y = 10; sdlRect1->w = 70; sdlRect1->h = 60; SDL_Rect *sdlRect2; sdlRect2->x = 10; sdlRect2->y = 10; sdlRect2->w = 70; sdlRect2->h = 60;