mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-23 14:42:28 +01:00
Merge pull request #82 from danielyxie/dev
Fixed bug with buying selling 0 shares
This commit is contained in:
commit
1069d40d2e
@ -227,6 +227,7 @@ function initSymbolToStockMap() {
|
||||
|
||||
//Returns true if successful, false otherwise
|
||||
function buyStock(stock, shares) {
|
||||
if (shares == 0) {return false;}
|
||||
if (stock == null || shares < 0) {
|
||||
dialogBoxCreate("Failed to buy stock. This may be a bug, contact developer");
|
||||
return false;
|
||||
@ -255,6 +256,7 @@ function buyStock(stock, shares) {
|
||||
|
||||
//Returns true if successful and false otherwise
|
||||
function sellStock(stock, shares) {
|
||||
if (shares == 0) {return false;}
|
||||
if (stock == null || shares < 0) {
|
||||
dialogBoxCreate("Failed to sell stock. This may be a bug, contact developer");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user