ComputerCraft Version Information: 1.3 Client / 1.3 Server

Description of Bug:
unloadAPI doesn't unload the API properly.

Steps to Reproduce Bug:
  1. Load any API with os.loadAPI("someApi")
  2. Try to unload it with os.unloadAPI(someApi)
  • Expected: _G.someApi should be nil, because the API should've been unloaded.
  • Observed: _G.someApi still holds a table while this error message occurs on trying to unload the API:
    bios:313: table index expected, got nil
Possible Solution:
In unloadAPI's code in the 'bios.lua' there's a typo.
Original code:

function os.unloadAPI( _sName )
  if _sName ~= "_G" and type(_G[_sName] == "table") then
	bProtected = false
	_G[sName] = nil
	bProtected = true
  end
end

In the 4th line sName should be _sName, so that it looks like this:

function os.unloadAPI( _sName )
  if _sName ~= "_G" and type(_G[_sName] == "table") then
	bProtected = false
	_G[_sName] = nil
	bProtected = true
  end
end

Suggestion:
It might also be useful to return a boolean value to be able to determine if the unloading was successful or not.
Because even with the fix above if someone tries to unload the API using e.g. a string as an argument, there won't be any error message at the moment.