Jump to content




crash any computer using gps.locate()


2 replies to this topic

#1 powerboat9

  • Members
  • 42 posts

Posted 22 August 2016 - 01:59 AM

Code

As I demonstrated earlier today on Lurcraft Relived, gps.locate only verifies that the gps hosts it receives messages from are sending tables with 3 coords (the location of the GPS host), but doesn't test to see if the coords are numbers. Sending three tables is enough to trip up an attempt to display the coords using tostring, or to trip up the latter attempt to do subtraction on a malformed vector.

Edited by powerboat9, 29 August 2016 - 01:09 AM.


#2 Lupus590

  • Members
  • 2,029 posts
  • LocationUK

Posted 22 August 2016 - 12:03 PM

the vector API should probably check that what it's getting is numbers too: https://github.com/a...rom/apis/vector


Untested code fixes, mainly for Dan200's convinece

Also, I've posted this to GitHub:https://github.com/dan200/ComputerCraft/issues/138

Edited by Lupus590, 22 August 2016 - 12:32 PM.


#3 powerboat9

  • Members
  • 42 posts

Posted 22 August 2016 - 06:20 PM

I made a resource pack to fix the bugs.

Edited by powerboat9, 29 August 2016 - 05:41 PM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users