Skip to content

Commit bd50e0b

Browse files
committed
update mod symbol
1 parent 3d8d37c commit bd50e0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/os.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void execute(void)
121121

122122
void validateNextProgram(int candidate)
123123
{
124-
candidate = candidate | 10;
124+
candidate = candidate % 10;
125125
if (statusTable[candidate] > 0)
126126
nextProgram = candidate;
127127
}
@@ -137,7 +137,7 @@ void fastKill(int process)
137137

138138
void kill(int process)
139139
{
140-
process = process | 10;
140+
process = process % 10;
141141
output(1027232 + process); // Faca
142142
fastKill(process);
143143
}
@@ -189,7 +189,7 @@ void findNextProcess(void)
189189
nextCandidate = statusTable[10];
190190
while (nextProgram < 0)
191191
{
192-
nextCandidate = (nextCandidate + 1) | 10;
192+
nextCandidate = (nextCandidate + 1) % 10;
193193
if (i == 10)
194194
return;
195195
if (statusTable[nextCandidate] == 2)

0 commit comments

Comments
 (0)