47niemand / zengl

Automatically exported from code.google.com/p/zengl
0 stars 0 forks source link

u_Copy(Ansi)Str results in Access Violation with empty strings #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
(Какие операции/etc. вызывают проблему?)
1. Call u_CopyStr('') or u_CopyAnsiStr
This will result in a Access Violation (or SSIGEV)

What is the expected output? What do you see instead?
(Что ожидается в итоге? Что происходит
вместо ожидаемого?)
An empty string

What version of the product are you using? On what operating system? With
what compiler - Delphi/FreePascal?
(Какую версию используете? На какой
операционной системе? С каким
компилятором - Delphi/FreePascal?)
FreePascal 2.6.0 on Windows

Please provide any additional information below.
(Пожалуйста, предоставьте
дополнительную информацию ниже)
u_CopyStr is also called internally, for example when you call 
"key_BeginReadText('', 20)". Adding a 

if (len > 0) then
  System.Move(...)

check fixes the problem.

Original issue reported on code.google.com by bil...@planet.nl on 18 Jan 2012 at 3:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r1415.

Original comment by dr.andru@gmail.com on 18 Jan 2012 at 4:31