Skip to content

Reversed coated string in result code #2

Open
@clemg

Description

@clemg

Describe the bug
When the input code contains ". ", the coating code is reversed and sometimes appears in the middle.
For some reasons, it does not happen every time, it depends on the position of the ". " string.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://clemg.github.io/pythongolfer/
  2. Enter a code with ". " in it
  3. Click the "Golf it!" button
  4. See error

Expected behavior
The result code should appear coated with the decoding python code, but instead we get a reversed string in the middle.

Screenshots

Desktop or Smartphone (please complete the following information):

  • OS: Windows 10
  • Browser Firefox
  • Version 84.0.2 (64 bits)

Edit: also works with "+ " in it.
Theory: Maybe when the "+" or the "." is in an even indice position in the string, the converted char in UTF-16 is a reversing one, it would explain what this happens only in this precise case.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions