rockbox/apps/plugins
William Wilgus 9a9c7f2b7c Fix lua failure to catch divide by zero and NaN exceptions
I can only assume in the course of the original conversion to fixed point
math in RbLua the fact that division by zero and NaN handling was to be
caught as a graceful exception by the floating point handler was overlooked.

As a result lua doesn't handle these exceptions and instead results in a
panic on the device.

This patch fixes this handling in the lexer for compile time Inf and Nan
results and in the luavm for runtime division by zero (Inf)

I missed the runtime exception of n%0 added checks for that as well..

Change-Id: I7746c087ea93678e5875f15ec6fe3f29f26bdb31
2018-06-05 18:47:57 +02:00
..
beatbox Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
bitmaps puzzles: add missing file 2017-11-21 19:54:14 -05:00
chessbox Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
clock Make fixepoint.c as a shared library (libfixedpoint.a). 2013-04-26 00:11:04 +02:00
doom Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
fft Replace fp_sqrt function with one that only uses shift, or and sub. 2017-10-01 20:29:38 -04:00
fractals Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
frotz Plugin Frotz: Match keymap and manual 2016-01-09 19:46:21 +01:00
goban Fix typo in goban 2017-09-01 22:00:59 -04:00
imageviewer Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
lib Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
lua Fix lua failure to catch divide by zero and NaN exceptions 2018-06-05 18:47:57 +02:00
midi Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
mikmod Fix dangerous casts 2017-02-04 17:24:47 +01:00
mpegplayer Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
pacbox Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
pdbox pdbox: fix bug shown by new gcc warning 2016-10-12 16:52:49 +02:00
pictureflow Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
puzzles puzzles: update frontend for new upstream, misc. changes 2018-04-24 19:06:30 -04:00
reversi Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
rockboy Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
sdl sdl: remove non-rockbox drivers 2018-03-12 20:52:01 -04:00
searchengine
shortcuts
sudoku Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
text_viewer Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
xworld xworld: support diagonal buttons on Zen X-Fi 2017-09-30 20:50:33 -04:00
zxbox Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
2048.c 2048: Cleanup 2015-04-19 17:48:12 +02:00
alarmclock.c Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
alpine_cdc.c Implement time-based resume and playback start. 2014-03-10 04:12:30 +01:00
battery_bench.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
bench_mem_jpeg.c
bench_scaler.c
blackjack.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
boomshine.lua Rename 'expanded' to 'expended'. Was this a typo? 2015-04-19 12:23:22 +02:00
bounce.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
brickmania.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
bubbles.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
BUILD_OVERLAY
calculator.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
calendar.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
CATEGORIES Port of Duke Nukem 3D 2017-12-23 21:01:26 -05:00
chessbox.c
chessclock.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
chip8.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
chopper.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
clix.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
codebuster.c
credits.c
credits.pl
crypt_firmware.c
cube.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
demystify.c
dice.c
dict.c
disktidy.c Fixed disktidy bug and added a couple of new features to disktidy. 2014-10-09 09:43:40 +02:00
disktidy.config
duke3d.c Port of Duke Nukem 3D 2017-12-23 21:01:26 -05:00
elfdep.pl
euroconverter.c
fire.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
fireworks.c fireworks: ues PLA_EXIT to exit without going through the menu. 2012-02-24 15:06:18 +01:00
firmware_flash.c
flipit.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
goban.c
greyscale.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
helloworld.c
helloworld.lua
invadrox.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
iriver_flash.c
iriverify.c
jackpot.c
jewels.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
keybox.c Keybox: display the entry name along with the password 2017-08-27 15:43:11 -04:00
lamp.c Lamp plugin: Allow toggling the button light using "select". 2015-02-22 12:22:40 +01:00
logo.c Fix some build errors and warnings. 2014-06-21 00:49:05 +02:00
lrcplayer.c Fix dangerous casts 2017-02-04 17:24:47 +01:00
main_menu_config.c Fix misleading indentation as pointed out by the new gcc warning 2016-08-12 15:33:28 +02:00
matrix.c matrix plugin: Fix out-of-bounds array access. Unify for-loop style. 2012-06-03 23:37:33 +02:00
maze.c
mazezam.c
md5sum.c
metronome.c YH8xx,YH9xx: Keymap improvement 2015-11-15 23:46:39 +01:00
minesweeper.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
mosaique.c Plugin mosaique PLA integration (code + manual) 2012-03-03 16:37:47 +01:00
mp3_encoder.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
nim.c
oscilloscope.c Oscilloscope plugin: bundle #define NEED_LASTBUTTON to a single place 2018-04-03 14:58:34 +02:00
otp.c Undo hacks to meant to get around string formatting limitations 2017-11-21 05:01:14 -05:00
pegbox.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
periodic_table.c Add tentative new element names, IUPAC approval expected around November 2016-12-04 18:05:51 +01:00
pictureflow.c Second try: Introduce plugin_crt0.c that every plugin links. 2010-08-24 14:30:46 +00:00
pitch_detector.c Revise the PCM callback system after adding multichannel audio. 2012-03-03 07:23:38 +01:00
pixel-painter.lua FS#11922: Lua game - Pixel Painter 2017-08-23 00:25:11 +02:00
plasma.c lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
plugin.lds Fix .ncbss from possibly overlapping .ncdata in plugins/codecs. 2013-07-11 04:32:23 -04:00
plugin_crt0.c
plugins.make iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
pong.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
properties.c Rewrite filesystem code (WIP) 2014-08-30 03:48:23 +02:00
random_folder_advance_config.c plugins: Add plugin_release_audio_buffer(). 2014-04-09 09:04:10 +02:00
remote_control.c
resistor.c scroll_engine: Rename scroll_stop* functions to be more consistent with the lcd api. 2013-12-14 23:11:30 +01:00
robotfindskitten.c Declaration of 'pause' from robotfindskitten has conflicting types for 'pause' from android-ndk-r5 2011-01-22 18:27:05 +00:00
rockblox.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
rockblox1d.c rockblox1d's plugin PLA integration (main code + manual) 2012-02-18 23:57:22 +01:00
rockbox-fonts.config
rockbox_flash.c Improve rockbox_flash messages 2012-02-05 16:26:09 +01:00
rockboy.c
rocklife.c
rockpaint.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
search.c
settings_dumper.c EQ settings: Rework the settings to clean up the config file. 2013-02-09 13:05:32 +01:00
shopper.c Shopper: slightly improve plugin and manual 2015-09-24 23:15:24 +02:00
sliding_puzzle.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
snake.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
snake2.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
snake2.levels
snow.c Plugin snow PLA integration (code + manual) 2012-03-03 10:48:22 +01:00
sokoban.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
sokoban.levels
solitaire.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
sort.c
SOURCES duke3d: restrict targets to ARM only 2017-12-24 18:01:28 -05:00
SOURCES.app_build iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
spacerocks.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
speedread.c Remove redundant code 2017-03-15 18:14:13 -04:00
splitedit.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
star.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
starfield.c Clean up peak calculating code. 2012-05-02 20:53:07 -04:00
stats.c stats's plugin PLA integration (main code + manual) 2012-02-22 09:15:50 +01:00
stopwatch.c Replace SAMSUNG_YH920_PAD with YH92X 2016-01-25 09:23:09 +01:00
stopwatch.lua stopwatch.lua: Improve button layout. Enable on touchscreen RaaA. 2012-01-29 22:35:49 +01:00
SUBDIRS pacbox for small screens, up to 75x96 2018-04-03 00:21:40 +02:00
SUBDIRS.app_build iBasso DX50/DX90: Major code cleanup and reorganization. 2015-02-02 21:57:55 +01:00
superdom.c Superdom: Silence warning. 2014-09-14 05:16:10 +02:00
test_boost.c
test_codec.c Get test_codec synced with changes in 6c868dd 2017-12-08 21:32:54 -05:00
test_core_jpeg.c
test_disk.c Align test_disk buffer for DMA. 2016-04-01 19:57:44 +02:00
test_fps.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_gfx.c test_gfx: Add benchmark for put_line(). 2014-01-07 14:13:41 +01:00
test_grey.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_greylib_bitmap_scale.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_mem.c test_mem: increase dram buffer if possible, cap number of iterations 2017-10-22 15:36:13 +02:00
test_mem_jpeg.c
test_resize.c
test_sampr.c Revise the PCM callback system after adding multichannel audio. 2012-03-03 07:23:38 +01:00
test_scanrate.c test_X plugins PLA integration 2012-03-03 19:55:51 +01:00
test_touchscreen.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
test_viewports.c lcd-16bit: Remove {lss,lse,lst}_pattern fields from struct viewport. 2014-01-07 14:13:48 +01:00
test_viewports.lua
text_editor.c Fix Samsung YH92X/YH820 keypad conditional in text_editor 2017-05-06 21:34:21 -04:00
theme_remove.c
vbrfix.c
video.c Tweak paramters of mp3_play_data and callback. 2012-03-04 14:50:47 -05:00
viewers.config Speed-reading plugin 2017-03-15 15:02:53 -04:00
vu_meter.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
wav2wv.c
wavplay.c
wavrecord.c wavrecord plugin: Add harmless sanity check 2014-12-21 17:22:09 +01:00
wavview.c
wormlet.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
xobox.c Zen XFi2: Enable Plugins 2018-04-03 11:34:01 +02:00
zxbox.c