aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2010-09-20 22:04:46 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2010-09-20 22:04:46 (GMT)
commitae7a54a4b6ddf6c8b0d16ecaa8145b2939aceec5 (patch)
treebb38d667e173a725d1e396cdce37c24f7c4177a8 /src/FbTk
parentb530c1405166665eaf1f341923a3574d5fcd9743 (diff)
downloadfluxbox_pavel-ae7a54a4b6ddf6c8b0d16ecaa8145b2939aceec5.zip
fluxbox_pavel-ae7a54a4b6ddf6c8b0d16ecaa8145b2939aceec5.tar.bz2
bugfix: ' floating point exception' due wrongly placed code
while integrating the old 'getSqrt()' function into the 'bsqrt()' function i misplaced some code. this lead to 'r' being 0 on the first run. doh.
Diffstat (limited to 'src/FbTk')
-rw-r--r--src/FbTk/TextureRender.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index c2f8e07..7b808af 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -76,9 +76,10 @@ unsigned long bsqrt(unsigned int x) {
76 sqrt_table[0] = 0; 76 sqrt_table[0] = 0;
77 sqrt_table[1] = 1; 77 sqrt_table[1] = 1;
78 78
79 unsigned long r = x >> 1; 79 unsigned long r;
80 unsigned long q; 80 unsigned long q;
81 for (x = 2; x < SQRT_TABLE_ENTRIES; x++) { 81 for (x = 2; x < SQRT_TABLE_ENTRIES; x++) {
82 r = x >> 1;
82 while (1) { 83 while (1) {
83 q = x / r; 84 q = x / r;
84 if (q >= r) { 85 if (q >= r) {