Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Commit 126db27

Browse files
committed
bin: Fix bug with : vs - in package name
Fixes issue #1 https://github.com/Obsidian-StudiosInc/jem/issues
1 parent 5d57d00 commit 126db27

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/env_manager.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,8 +347,14 @@ void jemPrintPackageClasspath(const char *name) {
347347
char *pkgs_str = calloc(strlen(name)+1,sizeof(char));
348348
char *cursor = pkgs_str;
349349
char *classpath = NULL;
350+
int pkg_name_len;
351+
int i;
350352
memcpy(cursor,name,strlen(name));
351353
while((pkg_name = strsep(&cursor,","))) {
354+
pkg_name_len = strlen(pkg_name);
355+
for( i=0; i<pkg_name_len; i++)
356+
if(pkg_name[i] == ':')
357+
pkg_name[i] = '-';
352358
package_found = false;
353359
struct jem_pkg *pkg = jemPkgLoadPackage(pkg_name);
354360
if(pkg) {

0 commit comments

Comments
 (0)