Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11007 - Unable to read negative numbers from file in Lua

Attached to Project: Rockbox
Opened by Corwyn Simpson (siber_cat) - Friday, 12 February 2010, 21:19 GMT+2
Last edited by Maurus Cuelenaere (mcuelenaere) - Saturday, 13 February 2010, 15:41 GMT+2
Task Type Bugs
Category Plugins
Status Closed
Assigned To Maurus Cuelenaere (mcuelenaere)
Player Type All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

As of r24615, the Lua interpreter won't read negative numbers correctly from a file.
I was using it to flag certain numbers that were saved and loaded to a file between runnings of my Lua script. The attached file is a hacked down version of my script that helped me notice the bug.
This task depends upon

Closed by  Maurus Cuelenaere (mcuelenaere)
Saturday, 13 February 2010, 15:41 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  In r24632.
Comment by Maurus Cuelenaere (mcuelenaere) - Saturday, 13 February 2010, 01:01 GMT+2
There's no attachment.

Are you sure r24615 is the culprit? Looks like that's codec related..
Comment by Corwyn Simpson (siber_cat) - Saturday, 13 February 2010, 10:23 GMT+2
After looking at the source code for the Lua plugin, I found it was a rather easy fix. Here (hopefully) is the patch for fixing this bug. And timer.lua was the original attachment.
   luafix.patch (0.7 KiB)
 apps/plugins/lua/liolib.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

   timer.lua (5.9 KiB)

Loading...