Skip to content

Commit

Permalink
Fixed compiler not compiling main program first bug
Browse files Browse the repository at this point in the history
  • Loading branch information
J0K0SAN committed Dec 26, 2021
1 parent 7e738c5 commit e6bea66
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
Binary file modified builds/JooSDK.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.johnsproject</groupId>
<artifactId>Joo</artifactId>
<version>0.2.1</version>
<version>0.2.2</version>
<packaging>jar</packaging>
<name>Joo</name>
<url>http://maven.apache.org</url>
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/johnsproject/joo/JooCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ public static String compile(final String path) {

programs = new ArrayList<>();
for (String file : FileUtil.list(directoryPath)) {
if(file.contains(CODE_ENDING))
if(!path.contains(file) && file.contains(CODE_ENDING))
programs.add(file);
}
programs.sort(null);
programs.add(0, new File(path).getName());

String byteCode = "";
for (String program : programs) {
Expand Down

0 comments on commit e6bea66

Please sign in to comment.