summaryrefslogtreecommitdiffstats
path: root/tdehtml/rendering/render_line.h
diff options
context:
space:
mode:
Diffstat (limited to 'tdehtml/rendering/render_line.h')
-rw-r--r--tdehtml/rendering/render_line.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tdehtml/rendering/render_line.h b/tdehtml/rendering/render_line.h
index 3dc066e10..8d4c8a256 100644
--- a/tdehtml/rendering/render_line.h
+++ b/tdehtml/rendering/render_line.h
@@ -84,7 +84,15 @@ public:
RootInlineBox* root();
- void setWidth(short w) { m_width = w; }
+ void setWidth(short w) {
+ if (w < 0) {
+ m_width = SHRT_MAX;
+ kdDebug( 6040 ) << " InlineBox::setWidth() invalid negative width " << w << " specified!" << endl;
+ }
+ else {
+ m_width = w;
+ }
+ }
short width() const { return m_width; }
void setXPos(short x) { m_x = x; }