ollieparsley / node-lightwaverf

A NodeJS library for controlling devices using the LightwaveRF Wi-Fi Link
Other
11 stars 7 forks source link

parseInt "bug" causes a hang on message 008 #1

Closed stevecraig closed 9 years ago

stevecraig commented 10 years ago

When sending message 008 it is saved in the response map as "0" which causes it to hang. The bug arises because parseInt("008") = 0 on nodejs (see discussion here https://groups.google.com/forum/#!msg/nodejs/H68wGy5x-OM/GJfqYoFcAj4J).

Simple fix is to add radix as second argument.
parseInt("008",10)

I'll submit a patch when I have finished experimenting.

ollieparsley commented 10 years ago

@stevecraig I only just noticed this issue. Did you have a patch?

ollieparsley commented 9 years ago

Fixed in master