Skip to content

Commit

Permalink
Update dice.yacc
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Hunter <ianfhunter@gmail.com>
  • Loading branch information
ianfhunter committed Mar 28, 2024
1 parent 4553112 commit df4f8ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/grammar/dice.yacc
Expand Up @@ -349,7 +349,7 @@ math:
long long v2 = collapse(vector2.storage.content, vector2.length);

vec new_vec;
new_vec.content = (long long*)safe_calloc(sizeof(long long), 1);
new_vec.storage.content = (long long*)safe_calloc(sizeof(long long), 1);
new_vec.length = 1;
if (v1 != 0 && v2 > INT_MAX / v1){
gnoll_errno = MATH_OVERFLOW;
Expand Down Expand Up @@ -539,7 +539,7 @@ math:
$<values>$ = new_vec;
}else{

long long v1 = collapse(vector1.stoeage.content, vector1.length);
long long v1 = collapse(vector1.storage.content, vector1.length);
long long v2 = collapse(vector2.storage.content, vector2.length);

vec new_vec;
Expand Down Expand Up @@ -773,7 +773,7 @@ dice_operations:

vec number_of_dice;
initialize_vector(&number_of_dice, NUMERIC, 1);
<

number_of_dice.storage.content[0] = (long long)dice.source.number_of_dice;

vec die_sides;
Expand Down Expand Up @@ -1565,7 +1565,7 @@ custom_symbol_dice:
// Set Num Dice
initialize_vector(&number_of_dice, NUMERIC, 1);

number_of_dice.content[0] = (long long)new_vector.source.number_of_dice;
number_of_dice.storage.content[0] = (long long)new_vector.source.number_of_dice;


// Set Die Sides
Expand Down

0 comments on commit df4f8ae

Please sign in to comment.