Skip to content

Commit 667c056

Browse files
Found and fixed another bug
1 parent e51b36a commit 667c056

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

while-de-encode/c/main

8 Bytes
Binary file not shown.

while-de-encode/c/main.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ struct String* inverse_phi_arithmetic(int index){
169169
}
170170
str = inverse_phi_arithmetic(values[0]);
171171
end = endOfString(str);
172-
end->next = newString(" \\times ");
172+
end->next = newString(" * ");
173173
end = end->next;
174174
end->next = inverse_phi_arithmetic(values[1]);
175175
free(values);
@@ -180,9 +180,9 @@ struct String* inverse_phi_arithmetic(int index){
180180
struct String* inverse_phi_boolean(int index){
181181

182182
if (index == 0) {
183-
return newString("\\false");
183+
return newString("false");
184184
} else if (index == 1) {
185-
return newString("\\true");
185+
return newString("true");
186186
}
187187

188188
int* values;
@@ -193,9 +193,8 @@ struct String* inverse_phi_boolean(int index){
193193
case 0:
194194
index -= 4;
195195
index /= 4;
196-
str = newString(" \\lnot ");
196+
str = newString(" ! ");
197197
str->next = inverse_phi_boolean(index);
198-
free(values);
199198
return str;
200199

201200
case 1:
@@ -205,7 +204,7 @@ struct String* inverse_phi_boolean(int index){
205204

206205
str = inverse_phi_boolean(values[0]);
207206
end = endOfString(str);
208-
end->next = newString(" \\land ");
207+
end->next = newString(" && ");
209208
end = end->next;
210209
end->next = inverse_phi_boolean(values[1]);
211210
free(values);
@@ -231,7 +230,7 @@ struct String* inverse_phi_boolean(int index){
231230

232231
str = inverse_phi_arithmetic(values[0]);
233232
end = endOfString(str);
234-
end->next = newString(" \\leq ");
233+
end->next = newString(" <= ");
235234
end = end->next;
236235
end->next = inverse_phi_arithmetic(values[1]);
237236
free(values);
@@ -329,6 +328,7 @@ void printString(struct String* string){
329328
int main(int argc, char *argv[])
330329
{
331330
int input;
331+
332332
do{
333333
printf("Enter a number:");
334334
scanf("%d", &input);

0 commit comments

Comments
 (0)