Skip to content

Commit

Permalink
Правильная позиция в exception
Browse files Browse the repository at this point in the history
  • Loading branch information
etar125 committed Feb 2, 2025
1 parent 7918880 commit faa9c2d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <stdint.h>
#include <stdbool.h>

#define _retset ret.line = line; ret.symbol = i
#define _retset ret.line = line; ret.symbol = ri

void tss_printerr(tss_exception e) {
if(e.code == 0) return;
Expand Down Expand Up @@ -94,7 +94,7 @@ void tss_ainit(tss_arg *a) {

tss_exception tss_docode(tss_varlist *list, char *code, size_t size) {
uint8_t argc = 0;
size_t line = 0, psize;
size_t i, ri = 0, line = 0, psize;
char *arg, *tmp;
tss_arg args[5];
for(uint8_t i = 0; i < 5; i++) {
Expand All @@ -105,7 +105,7 @@ tss_exception tss_docode(tss_varlist *list, char *code, size_t size) {
tss_sinit(&st);
tss_exception ret;
ret.code = 0;
for(size_t i = 0; i < size; i++) {
for(i = 0; i < size; i++, ri++) {
if(code[i] == '\n') {
// argpos[argc] = i;
line++;
Expand Down Expand Up @@ -166,7 +166,7 @@ tss_exception tss_docode(tss_varlist *list, char *code, size_t size) {
for(uint8_t i = 0; i < 5; i++) {
if(args[i].data != NULL) { free(args[i].data); }
tss_ainit(&args[i]);
}
} ri = 0;
} else if((code[i] == '"' || code[i] == '\'')) {
if(com) { com = false; }
else { com = true; }
Expand Down

0 comments on commit faa9c2d

Please sign in to comment.