Bug 14604 - incorrect numerical comparison is breaking textarea display on SP
: incorrect numerical comparison is breaking textarea display on SP
Status: CLOSED FIXED
Product: SqueezePlay
Classification: Unclassified
Component: UI
: 7.4.x
: Macintosh All
: P4 normal with 2 votes (vote)
: 7.4.1
Assigned To: Ben Klaas
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-10-06 08:48 UTC by Michael Herger
Modified: 2009-10-22 11:23 UTC (History)
0 users

See Also:
Category: Bug


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-10-06 08:48:54 UTC
if a response has count=0 and a window with a textarea, that text should be shown, but isn't. data.count==0 fails as data.count is considered a string. Ben's proposal:

--- squeezeplay/share/applets/SlimBrowser/SlimBrowserApplet.lua	2009-10-05 11:26:20.000000000 +0200
+++ ../build/osx/share/jive/applets/SlimBrowser/SlimBrowserApplet.lua	2009-10-05 16:54:18.000000000 +0200
@@ -1154,7 +1154,7 @@
 			_renderSlider(step, data.item_loop[1])
 
 		-- avoid infinite request loop on count == 0
-		elseif step.menu and data and data.count and data.count == 0 then
+		elseif step.menu and data and data.count and tonumber(data.count) == 0 then
 			-- this will render a blank menu, which is typically undesirable
Comment 1 Michael Herger 2009-10-10 00:35:30 UTC
Ben - you didn't fix this yet, did you? Today it all seems to be working again... Controller: 7834, Baby: 7837
Comment 2 SVN Bot 2009-10-12 12:31:41 UTC
 == Auto-comment from SVN commit #7843 to the jive repo by bklaas ==
 == https://svn.slimdevices.com/jive?view=revision&revision=7843 ==

Fixed Bug: 14222
Fixed Bug: 14604
Description: make sure that data.count is type(number)
bump when hitting an undefined preset key
Comment 3 James Richardson 2009-10-22 11:23:28 UTC
This bug has been marked as fixed in the 7.4.1 release version of SqueezeBox
Server! 

Please see the Release Notes for all the details:
http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from
http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with
your new comments and we'll have another look.