normanmaurer / netty-in-action

2.07k stars 1.76k forks source link

fix IndexOutOfBoundsException in CmdDecoder #67

Open jelmerk opened 11 months ago

jelmerk commented 11 months ago

The code from the book produces the following exception

Error evaluating method : 'slice': Method threw 'java.lang.IndexOutOfBoundsException' exception.

The second argument to slice is the length not the "to index"