08-6-2016, 06:12 PM
|
#935
|
Doing the wrong thing the right way since 2010.
Site and Game Administrator
Join Date: Jul 2007
Posts: 1,812
|
Re: Bugs that don't deserve their own thread
Quote:
Originally Posted by Zapmeister
well done to the velocity engine for rendering 0x69 as " 105"
(for those who don't get it, 0x before a number in compsci-speak means you want the number to be hexadecimal, and 69 in hex is 105 in decimal. but how did the engine confuse the string "0x69" with int(0x69) ?! )
pic
|
It's a common issue with the engine.
It mostly comes from the parsing of the playlist where certain things are strings and certain things are numbers. But because flashvars doesn't contain the type and I was really bad at writing simple stuff long ago, all song variables are passed though a isNaN() then either Number() or nothing to convert the correct strings to numbers.
This fails on song names as some happen to be perfectly valid numbers, and Number() can interpret "0x" enough to determine it's hex and display "correctly".
TL;DR:
I check things too basically and doesn't stop edge cases. Woops.
Last edited by Velocity; 08-6-2016 at 06:17 PM..
|
|
|