Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-11-26 20:07:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-11-26 20:07:31 +0300
commitcfd3b11630161a802233b905f7076899888c6fe3 (patch)
tree29653a787a140e0769256c50e823288821c8c802 /source/blender/editors/space_info
parentcf0820d6285c3a9379dd529ee50dcf39e2efa21c (diff)
fix building blenderplayer and a divide by zero bug with the console view.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/textview.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/space_info/textview.c b/source/blender/editors/space_info/textview.c
index 315130136a2..343130d96ce 100644
--- a/source/blender/editors/space_info/textview.c
+++ b/source/blender/editors/space_info/textview.c
@@ -238,6 +238,7 @@ int textview_draw(TextViewContext *tvc, int draw, int mval[2], void **mouse_pick
assert(cdc.cwidth > 0);
cdc.lheight= tvc->lheight;
cdc.console_width= (tvc->winx - (CONSOLE_DRAW_SCROLL + CONSOLE_DRAW_MARGIN*2) ) / cdc.cwidth;
+ CLAMP(cdc.console_width, 1, INT_MAX); /* avoid divide by zero on small windows */
cdc.winx= tvc->winx-(CONSOLE_DRAW_MARGIN+CONSOLE_DRAW_SCROLL);
cdc.ymin= tvc->ymin;
cdc.ymax= tvc->ymax;