7

想到了上初中时候遇到的一个 Bug 分享给大家看看

 1 year ago
source link: https://www.v2ex.com/t/936393
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

V2EX  ›  问与答

想到了上初中时候遇到的一个 Bug 分享给大家看看

  dsgdsfh · 3 小时 21 分钟前 · 500 次点击
初中时候发现了学校食堂饭卡可以透支。
上午第三节课下课去学校商店买了个东西,此时饭卡余额好像是剩下仅有的几块钱,理论上讲买了东西应该剩下一两块钱,但是中午发现余额还和买东西前一样,怀疑是在商店买东西时候没刷上卡。然后中午去食堂买饭,买了和当前显示余额金额差不多的东西吃。按照商店刷卡没刷上的思维,这时候卡里应该剩下几毛钱。按照刷卡交易记账延迟的想法,应该此时已经是透支状态。
下午同学拿上卡去商店买东西,把卡放刷卡机看余额,发现是负数了,然后同学拿我的卡买了包零食,刷卡成功。我后来想买东西,结果无法刷卡。
只能充值之后再买东西,充值了 100 ,然后去买东西,余额剩下九十多,充值并没有 bug 发生。
一直很好奇透支的 bug 是如何产生的,为何有时可以有时却不行。(我没听说过别的同学发生过透支的情况,似乎只在我身上发生过。)

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK