Skip to content

Commit

Permalink
cmatrix.c: Calculate randnum against hardcoding it
Browse files Browse the repository at this point in the history
Modifies code to calculate randnum from values of highnum and randmin
which are used for matrix randum unicode generation. The last
implementation contained hardcoded values.

Signed-off-by: Abishek V Ashok <[email protected]>
  • Loading branch information
abishekvashok committed Mar 27, 2019
1 parent 80e1c4a commit 66ab05c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions cmatrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -437,18 +437,16 @@ if (console) {
/* Set up values for random number generation */
if(classic) {
/* Japanese character unicode range [they are seen in the original cmatrix] */
randnum = 63;
randmin = 12288;
highnum = 12351;
} else if (console || xwindow) {
randnum = 51;
randmin = 166;
highnum = 217;
} else {
randnum = 93;
randmin = 33;
highnum = 123;
}
randnum = highnum - randmin;

var_init();

Expand Down

0 comments on commit 66ab05c

Please sign in to comment.