virtual-labs-archive / computer-programming-responsive-iiith

This repository contains the responsive Computer Programming Lab IIITH
https://cse02-iiith.vlabs.ac.in
Other
1 stars 325 forks source link

Expression_Evaluation_Simulation #477

Open MohsinMamoon opened 5 years ago

MohsinMamoon commented 5 years ago

Issue: Variables accept characters as input instead of just integers. This further results in an infinite loop on evaluation and Infinite loop on getting 'Infinity' or 'NaN' in the answer

Steps to reproduce:

  1. Go to http://cse02-iiith.vlabs.ac.in/exp10/simulation/index.htm
  2. Set a = 'a'
  3. Select any expression.
  4. Start the Simulation.

Expected Result: Error message saying variables cannot be non-integers

Actual Result: Simulation Starts and ends up stuck in a never ending process.

Screenshot: Screenshot from 2019-03-16 19-08-11

KanishAnand commented 5 years ago

issue fixed commit id: https://github.com/virtual-labs/computer-programming-responsive-iiith/pull/480/commits/9bcda5ad63f9d1a526a50a7661db67ef6c758ca2

MohsinMamoon commented 5 years ago

Better fix: Commit ID: 849e913

DevikaBoddu commented 5 years ago

Valid fix : @MohsinMamoon