diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml
index 98bddf44aff..f31643a8e07 100644
--- a/doc/classes/NodePath.xml
+++ b/doc/classes/NodePath.xml
@@ -96,7 +96,7 @@
- Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]).
+ Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count] - 1).
[codeblock]
var node_path = NodePath("Path2D/PathFollow2D/Sprite:texture:load_path")
print(node_path.get_subname(0)) # texture