Home » U++ Library support » ScatterDraw & ScatterCtrl » Uninitialized variables in the file ScatterDraw.cpp will cause crash (Using Visual Studio 2013)
Uninitialized variables in the file ScatterDraw.cpp will cause crash (Using Visual Studio 2013) [message #45947] |
Sat, 30 January 2016 10:53  |
kasome
Messages: 78 Registered: July 2008 Location: Taiwan
|
Member |
|
|
Uninitialized variables in the file ScatterDraw.cpp will cause crash (Using Visual Studio 2013)
In the file ScatterDraw.cpp, the following function
void ScatterDraw::DrawLegend(Draw& w, const Size &size, int scale) const {
.................................................
int plotLeft, plotTop, rectWidth, rectHeight; // uninitialized variables
.................................................
int left = plotLeft + legendPos.x*scale; // will cause crash here
.................................................
}
just make sure the variables has been initialized before using it, that should fix the problem, i.e.
int plotLeft = 0, plotTop = 0, rectWidth = 0, rectHeight = 0;
the patched file and the original file will upload as the attachment file, please update.
|
|
|
|
Goto Forum:
Current Time: Tue Apr 22 07:33:32 CEST 2025
Total time taken to generate the page: 0.02129 seconds
|