Phate6660 / gzdoom-discordrpc

DiscordRPC for GZDoom, written in Rust.
Other
13 stars 2 forks source link

Out-of-bounds issue? #4

Closed AeriaVelocity closed 3 years ago

AeriaVelocity commented 3 years ago

I get this error whenever I use it with GZDoom:

> gzdoom-discordrpc.exe gzdoom
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src\main.rs:35:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Phate6660 commented 3 years ago

Hmm, I see the issue. It must be picking up the wrong window title and attempting but failing to split it.

Do you have any windows in the name that contain "doom" in the title?

I thought I added regex to not grab firefox and palemoon windows, but I need to add more exclusions.

AeriaVelocity commented 3 years ago

Nope, GZDoom was the only one at the time. I also use a mod that changes the window title, so I'll try running it unmodded.

AeriaVelocity commented 3 years ago

Yep, GZDoom unmodded doesn't work either, and I have no other windows open except Firefox and Command Prompt.

AeriaVelocity commented 3 years ago

Wait, no, never mind. GZDoom works unmodded, just not with the mod I was using at the time.

Phate6660 commented 3 years ago

Yeah, that'd be the issue. The program expects the title to be in the format level - game.

I should add to the README that this is incompatible with anything that changes the window title from that format.

AeriaVelocity commented 3 years ago

Right, thanks.